Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1345657

    When I update to Enfold 4.9 last February I got a problem with unwanted changes in my footer.

    It turned out that this issue was caused because I overide the footer.php file in my Child Theme. After replacing the footer,php file in my Child Theme with the parent theme version footer.php file did solve the issue (but I lost my edits)

    I have 5 Enfold websites and all of them have a Child Theme with a footer.php and also a header.php file. For example, I use the header.php file for adding Google Analytics code in there, because by default Enfold is placing GA code in the footer which I don’t want.

    But the issues with my footer after update 4.9 got me thinking: I don’t want to take the risk that after an Enfold update my footer.php and/or header.php file is causing issues because I overide them in my Child Theme.

    So I quess that to be save from this kind of issues it’s better practice to only keep a style.css file in the Child Themes, and no further files?

    Thanks,
    Alwin

    • This topic was modified 2 years, 7 months ago by Alwin.
    #1345660

    If your aim it to insert content into the head then just use the code snippets plugin or add a snippet to your child theme’s function.php file.
    Something like the below snippet would work for either method and allow you to insert your GA code in the head;

    add_action( ‘wp_head’, ‘add_to_content_head’ );
    function add_to_content_head() {
    echo ‘
    ADD YOUR GA OR OTHER CODE HERE
    ‘;
    }

    Creating additional header & footer files in your child theme is always going to give you potential issues when updating the parent theme.

    #1345662

    Hi, I have a similar issues…
    All the widgets on the footer are not displayed anymore since 4.9…
    They are replaced by the default ones when you install the Enfold theme..
    Someone can help me to fix this ? or maybe its a bug from the theme ?

    Thanks ,

    #1345663

    Benojack
    When I’ve seen this issue previously the widgets in the footer columns had all switched back to default.
    Are you able to edit your footer and select the correct widget areas from the dropdowns again?

    #1345688

    Hello Steve, thanks for your quick reply.
    On the backend in wordpress, the widget are still there like before, but when I go in the website, my widgets are not displayed… its the “default one”…
    Very strange

    #1345690

    Do you mean they still show in Appearance > Widgets or do they show in the footer page (if you have it set to use page as footer).
    I had to go into my footer pages and reselect the correct widget areas for each column.
    If they’re shown correctly in admin it may be worth changing them & saving before changing them back & saving again?

    #1345693

    Yes , I did that ! And for check I add some more news widget, and they didnt displayed too..

    #1345720

    Hi Alwin,

    There’s no point in overriding a whole file if you are only looking to add a tracking code or similar, you can use a function in functions.php like suggested above by @steve. Also, if you want to make sure that nothing breaks on your sites after an update, then perform the update on a staging or development site first.

    Best regards,
    Rikard

    #1345722

    Hi benojack,

    Are you overriding header.php or footer.php in a child theme? If so, then replace those files with the parent theme files, then add your customisations back in after that. If you need further help, then please open a new thread and include WordPress admin login details in private, so that we can have a closer look at your site.

    Thanks for helping out @steve :-)

    Best regards,
    Rikard

    #1350818
    This reply has been marked as private.
    #1350846

    Hi williamslyd,

    Are you overriding footer.php or header.php in your child theme? If so, then please try to replace those files with the parent theme version, then add your customisations back in after that. If you need further help, then please open a new thread and include WordPress admin login details in private, so that we can have a closer look at your site.

    Best regards,
    Rikard

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