badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Override files in "inc" folder with child theme

Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #17188
    ariellebarnettgQA
    Participant

    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

    #17189
    Wolf
    Participant

    AFAIK 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).

    #17192
    ariellebarnettgQA
    Participant

    thank 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

    #17193
    arshi4you
    Participant

    Hi,

    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!

    #17194
    arshi4you
    Participant

    Hi,

    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!

    #17195
    ariellebarnettgQA
    Participant

    as 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?!

    #17196
    arshi4you
    Participant

    Child 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!

    #17206

    Hi 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!

    #17244
    Wolf
    Participant

    Sounds 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.

    #17253
    ariellebarnettgQA
    Participant

    nice 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.

    #17258
    Wolf
    Participant

    Indeed 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…

    #17274
    arshi4you
    Participant

    Yes, That should be…!

    #17286

    HI 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!

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.