Is it too late to create a child theme

When I installed WordPress I didn’t know anything about it so have made lots of silly mistakes, like editing the main theme, not a child theme.

I’ve made quite a lot of changes (minor, but a lot of work to redo) and I don’t know how easy it would be to go back and create a child theme in retrospect so that they aren’t lost when I need to update. It’s taken a lot of trial, error and heartache to get to this stage and I’m not sure I could replicate my results without going through it all again!

Can anyone tell me how easy this would be to do, and whether it is worth doing at this stage?

  • Arun Basil Lal
    • New Recruit

    Hey sequin,

    Welcome to the Forum!

    I think it could be worth it, esp if your main theme is updated quite often. Here is what I would suggest. Make a backup of your edited theme. Get a fresh copy of your original theme and create a child theme for it.

    Now start copying the edits from the old theme. Sometimes you just want to include the edited file as such. For eg, if you have edited header.php, you just want to copy the header.php from your backup to the child theme folder, its that simple.

    If nothing of these work, you can always go back to the backup theme. Its gonna be worth it in the long run.

    (btw, if you are using an old theme, you might be using the older version of timthumb, and would be a good idea to update the theme. Hope you have heard of the recent timthumb vulnerability.)

    Let me know if you have more questions. Good luck!

  • sequin
    • Site Builder, Child of Zeus

    Thanks Arun,

    That makes sense. I know the basic coding I need to put at the top of child pages but if I am just putting in those changes as you suggest, do I need to add any additional lines of code to call functions etc from the original theme?

    Sorry – I know it’s a very basic question, but I’m desperate to get my head around child theming so I can rearrange my product list in MarketPress too!

  • Arun Basil Lal
    • New Recruit

    Hey sequin,

    First off, you don’t have to apologize, that’s what we are here for right? :wink:

    If you are referring to the functions in the functions.php, then No, you don’t have to do anything. Here is how child themes work.

    Say there is a header.php in the parent theme and header.php in the child theme. In that case, the header.php in the child theme has preference. IF not, any mention of header.php in any of the child theme files would go to the header.php of the parent theme.

    Hope this helps. As always, feel free to ask :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.