• Hi. I’ve changed files in the theme used on my WordPress site – including style.css, index.php, page.php.

    Recently, the theme developer updated the theme and that was when I learned about child themes.

    How would I keep the modifications I’ve made while updating the theme?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Your child theme folder will NOT be updated if you followed the steps. That is the genious thing with using a child theme.

    Thread Starter dm4n

    (@dm4n)

    The problem is that I have not yet implemented the child theme. So I guess I’m working backwards from what’s described in the Codex for the child theme.

    Is it possible to import the changes I’ve made in the various parent theme files, into the new child theme, and then update the parent theme?

    I found this thread which deals with the same issue.

    Is it possible to import the changes I’ve made in the various parent theme files, into the new child theme, and then update the parent theme?

    Yes, but that might be a bit tedious if many changes have been made. After making a backup copy of what you already have, I would ask your Developer whether s/he is willing and able to set you up properly, but I suspect you might be on your own there or you would already be running a Child Theme…and that might not actually be a big problem if the Theme you are running is not likely to have future updates coming anyway. In my own case, I do not make changes of my own without being sure my Developer knows about them and adds them to his own backups, and my Developer does not make changes without first letting me know what is coming.

    Yes, you can move your changes to a child theme – first make a complete back up of all your files.

    Then create a child theme per the instructions here – http://codex.wordpress.org/Child_Themes

    Then move a copy of any .php file (EXCEPT functions.php and style.css) you have modified into the child theme folder.

    For style.css, you will need to compare your file to the unmodified version – there are file comparison tools that can help you with this. Put only the changes to CSS in the child theme style.css file.

    If you’ve made changes to the functions.php file, you’ll need to read the instructions in the Codex as to how to put those in a child theme.

    Once you’ve done the above, activate your child theme. Note that theme settings and options do not transfer to a child theme (like any other new theme) so you will have to redo those.

    Once that’s done replace/update the parent theme.

    Again, make frequent archive copies of your files as you are working on this – so that if you mess up, you can easily go back a step.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘child theme’ is closed to new replies.