• kop44

    (@kop44)


    Hi there,

    I already started changing the twentyeleven theme before I read about the whole child – parent thing.

    So now I want to make a copy of the changes I made to the original theme and then call it a child. Is it possible to do this, or do you have to make the child theme first before you start messing around?

    Any replies would be gratefully received 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • david.bailey

    (@davidbailey-1)

    What I would do is make a child theme, add to it the files that have been changed, and replace your TwentyEleven with the one in the WordPress repository. Then you should be fine.

    Thread Starter kop44

    (@kop44)

    hmm… I’m not entirely sure what I changed and what I didn’t. I’m new to this and was just playing around with things until I got them like I wanted.

    david.bailey

    (@davidbailey-1)

    I can’t help you there. At some point you’ll need to know what changes you made so you can add those changes to your child theme. Try adding the files you remember, and if later on you find something that doesn’t reflect some of the changes you made, you can go back and add the file with the changes.

    Thread Starter kop44

    (@kop44)

    When you say “add the files” do you mean the .php files for example.

    As far as I remember, I went into the header files and the style files for example. So I would have to add them – is that what you mean?

    Thank you.

    david.bailey

    (@davidbailey-1)

    Yes, if you’ve edited the header.php template file then you would put that file in the directory of the child theme. You can also add the styles from the stylesheet file in the parent theme to the child theme’s stylesheet file.

    Thread Starter kop44

    (@kop44)

    So is it not possible for me to copy all files over so that I cover all bases?

    david.bailey

    (@davidbailey-1)

    It would be possible, but that would defeat the purpose of having a child theme.

    Thread Starter kop44

    (@kop44)

    Oh. I thought that the purpose of having a child theme was so that when you update the twentyeleven theme for example, you don’t lose all your changes?

    I thought that if copied over all my modified twentyeleven files, and then called the theme modifiedtwentyeleven, I would be safe from any updates to twentyeleven.

    Have I misunderstood?

    Thanks for your help!

    david.bailey

    (@davidbailey-1)

    You can update TwentyEleven still, but you wouldn’t get any of the benefit of the updated theme if you had once copied every file from a previous version of the theme into your child theme. The idea is that the child theme will automatically use template files from the parent theme unless you overwrite those template files by adding them to the child theme.

    Thread Starter kop44

    (@kop44)

    Oh I understand now. Thanks very much. I will try what you said: I’ll try to add the files that I remember changing.

    Thanks again for your help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Make a child theme after changes to parent have been made’ is closed to new replies.