Tagged: child theme
- This topic has 12 replies, 4 voices, and was last updated 10 years, 2 months ago by Theme Horse Support Team.
-
AuthorPosts
-
October 7, 2014 at 1:44 pm #17188ariellebarnettgQAParticipant
Hi all,
i’m attempting to override some files like theme-option.php, footer-extension.php with the same file duplicated in the same folder hierarchy that i created in the child theme.
The changes doesn’t seems to override the files in parent theme, and if i make the changes in the original files all works as expected.
Is there a way to have all files in the child theme override their counterparts in the parent theme?
thanks
October 7, 2014 at 1:55 pm #17189WolfParticipantAFAIK this is not possible (and not foreseen in the child theme concept).
I simply copied the relevant function blocks into my child theme’s functions.php and modified them according to my needs. Works for me – YMMV
However, I did not succeed in modifying the “Copyright…” line in the footer with that method (just in case you’re aiming at that one).October 7, 2014 at 2:18 pm #17192ariellebarnettgQAParticipantthank you wolf,
so it work just for function.php? for the other files in the “inc” folder i should modify the original and mantain a sort of “log file” for myself to remember my changes if the theme will update?!thank you
October 7, 2014 at 2:31 pm #17193arshi4youParticipantHi,
The same question i have too, I have edited “header-extensions.php” in “inc” folder, Its working when i m implementing it in original/main theme, but if make same changes in Child-theme, Its not working/overriding.
As you said, if you make any changes, make changes in child theme and it will work, but unfortunately its not working in our case…I am using same file and folder structure as main theme!
any help will be appreciated,
Thanks in advance!
October 7, 2014 at 2:42 pm #17194arshi4youParticipantHi,
The same question i have too, I have edited “header-extensions.php” in “inc” folder (basically adding some plugins custom code), Its working when i m implementing it in original/main theme, but if make same changes in Child-theme, Its not working/overriding.
As you said, if you make any changes, make changes in child theme and it will work, but unfortunately its not working in our case…I am using same file and folder structure as main theme!
any help will be appreciated,
Thanks in advance!
October 7, 2014 at 2:51 pm #17195ariellebarnettgQAParticipantas wolf say, probably “is not foreseen in the child theme concept”
i have a question, so the overriding works only for the firts level folders? all the files in nested folders are not seen by the child-theme concept?!
October 7, 2014 at 3:19 pm #17196arshi4youParticipantChild theme can deduct any level of folders, like if u will create a folder “page-templates” in child theme and add any template it will be listed..! So i don’t think it is the problem, there will be something else, for which i m finding solution.
will wait for Theme Horse support, may be they can help!
October 7, 2014 at 5:08 pm #17206Theme Horse Support TeamKeymasterHi all.
If you want to customize the code then first create a interface Pro child folder then after create a styles.css file and import it. Create a new functions.php file then after first unhook the functions and after this only customize the code. So that you can modify the code and while updating to our new version you are also free to update.http://codex.wordpress.org/Child_Themes
Thank you!
October 8, 2014 at 12:25 pm #17244WolfParticipantSounds really tempting, but like the OP I was not able to get it working. But as my only concern was the footer I found a solution which I described here.
October 8, 2014 at 2:33 pm #17253ariellebarnettgQAParticipantnice solution Wolf, i have found a solution too, http://www.paulund.co.uk/override-parent-theme-functions
it worked for me, and you just have to add the ‘if’ statement on each funtion (of parent theme) that you’ll modify.October 8, 2014 at 7:45 pm #17258WolfParticipantIndeed nice and easy – but I didn’t want to modify the parent theme because all this is lost (i.e. must be rebuilt) after a parent theme update.
Would have been nice if Theme Horse had wrapped the footer functions right away like they did it in other files already. But that would then be one point less on the advantages of the paid version…October 9, 2014 at 8:20 am #17274arshi4youParticipantYes, That should be…!
October 9, 2014 at 11:50 am #17286Theme Horse Support TeamKeymasterHI all,
If you want any functions to be changed then first unhook and then customize the code. At first create a child folder and inside it create a 2 file style.css and functions.php file
http://codex.wordpress.org/Child_Themes
under style.css file import the css from the parent interface theme and under funcitons.php file first unhook the parent file and then only customize the code. For more other support than this you need to hire a developer.Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.