Support » Fixing WordPress » Changes to functions.php on a child Theme not propagating

  • Hi Everyone,

    I have been struggling with this error for some time now, without being able to find a solution.

    The thing is – when I make changes to the functions.php file of a child theme, the changes don’t propagate and some previous, prealoaded version is served.

    For example:
    When I change in the function.php file:

    function websites_depot_move_new_shipping_table() {
    echo ‘<h2>Volba dopravy</h2>’;

    }

    TO:

    function websites_depot_move_new_shipping_table() {
    echo ‘<h2>TEST</h2>’;

    }

    The old version is still being served. Even after clearing the cache, caching plugins, Cloudflare cache ….

    Making changes to other themefiles works fine and propage normally – I am led to believe this must be some issue in the code od the file itself.

    Can anyone here help?

    Thanks,
    Viktor

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Two ideas come to mind…

    I suspect the child’s functions file might be broken somehow. Make sure you are editing the right file also… I’ve messed up that way a few times myself.

    If you don’t have any other changes made to ‘functions’ already then copy the functions file from the parent to the child and make your changes then.

    You could also make your changes to the parent’s functions file then copy it over. You could even run on the parent theme while making changes then copy the changed file(s) over to the child.

    A lot of child themes start out as modified parent files with the changes then copied over to a child theme just to preserve them from the next theme update.

    As long as you can keep it straight then it’s ‘whatever works’.

    Thread Starter vik10255

    (@vik10255)

    Thanks fo the respons @jnashhawkins. The thing is, quite a lot of changes have already been made to the child theme. So rewriting it owuld take a lot of effort.

    What wonders me is that whatever changes I make – they appear in theme editor and in the functions.php – nothing gets propagated and some old version is being served.

    For example <p> tags with text I can find nowhere else in the theme.

    Another thing is, whenewer I try to make a change in the theme editor, the update button keeps loading anf then suggests that the changes might not have been saved.
    However, when I close the page and come back, the changes are there in the editor. Not propagated on the front-end though.

    Is there some internal cache file or somethin that wordpress uses internally? Other than the theme files?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changes to functions.php on a child Theme not propagating’ is closed to new replies.