WordPress.org

Ready to get started?Download WordPress

Forums

Child Theme: Can i convert a parent theme into a child theme (2 posts)

  1. australia111
    Member
    Posted 3 years ago #

    Hi WP experts,

    I've searched the web but can't find an answer to this issue. I've been customising a theme for 2 months and are more or less finished, however I've just learnt about Child Themes. So to keep everything up to date i need to setup a child theme.

    I've found the info on how to do that but I don't know how to proceed because I've already customise the parent theme.

    Is there a way to turn the parent theme into a child theme or do i need to delete everything and start from scratch?

    Many thanks!

  2. vtxyzzy
    Member
    Posted 3 years ago #

    I am not quite sure what you want to do. I think what you want is to use the original, unmodified theme as the parent, then your modified version as the child.

    Here is what I think will work for you, and is easy to undo if not.

    • BACK UP YOUR THEME!
    • Deactivate your modified theme.
    • Rename your modified theme folder to something different from the original, maybe Child-of-originalname.
    • Re-install the original theme in its original folder.
    • Modify your child theme style.css as instructed in the Codex Child Themes article.
    • Activate your new child theme.

    Your child theme should now operate normally, with all of your modifications.

    At your leisure, compare the files in the child theme folder to those in the original. If they are identical, delete the file from the child folder. The child theme should still function normally after each deletion.

    You can also remove unmodified rules from your child style.css.

    This should leave all modifications in your child theme folder, with all of the original code coming from the unmodified parent.

Topic Closed

This topic has been closed to new replies.

About this Topic