• I just made a blog from a theme called Application. I edited the CSS to conform to my needs. Now I want to make a child theme from the edited parent version. I’m sitting here reading all about how NOT to edit parent themes. Have I done irreparable harm?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Nope, but you’ve had a Damascene moment which may alter the course of your life. Congratulations.

    Here’s what you need to do…

    Create your child theme directory and copy into it all the files you altered in the parent (copy, not move!), such as:

    • style.css
    • any PHP files
    • functions.php

    Only copy the files you altered and any files you created. Any files you created can be deleted from the parent theme’s directory once you’ve copied them across (you might like to just rename them *.bak or something temporarily).

    You **can** copy all the files from your parent if you want to be absolutely sure you have everything, but it’s a bit wasteful if you don’t absolutely have to do it because you can’t remember at all what you changed.

    Now replace the comment block at the top of style.css (in your child) with the comment block for a child.

    If you can remember which style rules you altered in the parent, just retain those in your child theme’s style.css, delete the rest and add a reference (@import) to the parent style.css file. Otherwise, just keep the lot.

    Now activate your child theme and check that your site is OK.

    Finaly, you can reinstall the parent theme, putting it back to its pristine state.

    Simples

    Cheers

    PAE

    Thread Starter michael180

    (@michael180)

    Thanks peredur, you’ve been very helpful.

    Michael

    Saint Paul on the road to Damascus . . .

    We do our best …

    PAE

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is it too late?’ is closed to new replies.