• Please forgive this newbie question.

    I started creating a WP site using the basic twentytwelve template, and made some modifications to the .css before being cautioned to make a child theme with its own .css. I understand that a child theme can contain as little as a .css file.

    My theoretical question is this. Since I tweaked the original theme folder, could i not just make a copy of that parent theme folder, give it a child name, and then place it within the parent folder. Because it is a copy of the parent theme folder, its (child) .css would be an exact copy of the parent’s .css. I would then give that child .css a child name and ask it to import styles from the parent. Since I had modified the parent css, the child css would already include those modifications, right? Going forward, this child css would be the file to edit, and if WP was updated, my changes, now in child .css, would not be lost.

    The css is the only parent file I have been editing. Should I be concerned about including other files, or plugins. I am assuming that a Custom Menu would transfer over with a new update, but I’m not sure. I don’t have a real sense of what might be lost, other than css styling, with an update.

    Can you clarify this.

    Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Yes, that’s possible but NOT recommended – it creates duplicate CSS code and it makes it MUCH harder to keep track of what you have changed and to find any problems with the CSS.

    You can easily use a file comparison program to compare your style.css to the original one. Many text editors will do this as will

    http://www.diffchecker.com/

    When you switch to the child theme you will have to redo some of the changes you’ve made – menus and widgets in particular.

    Thread Starter labisca2012

    (@labisca2012)

    Ok, but I don’t understand why I would lose anything if the original folder (active parent) and contents that I would copy to make the child theme would necessarily include all of those modifications, including menus and widgets?

    HOw could I keep a record of all the menu and widget changes i’ve made and would like to transfer over.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    HOw could I keep a record of all the menu and widget changes i’ve mad

    Spot the difference between your file & the theme’s original file
    http://diffchecker.com

    Because theme options are theme-specific and stored in your database for that theme – they won’t transfer to ANY new theme. In this respect a child theme is like any other different theme. It’s just how WP works :).

    Thread Starter labisca2012

    (@labisca2012)

    WPyogi: Are you saying you’d have to reinstall the widgets and recreate the menus when updating say twentytwelve to a newer release?

    WPyogi and Andrew: It seems like you are all talking about comparing the css files. What about the other files php from the parent twentytwelve. What of these do you include in a child theme so that when twentytwelve is updated, those nuances transfer over. Media files?

    Would twenty thirteen be considered a completely new theme altogether, and not an upgrade of twentytwelve?

    Thank you for indulging these questions.

    No, updating the theme will not lose your theme options and settings. It WILL lose any changes you have made to theme files (style.css or any theme php files).

    You include in a child theme ANY and ALL theme files (.css or .php) you have modified. This means FILES (i.e. in the Editor or by a text editor on your local computer) not theme options/settings you have made in the regular Dashboard (except Editor).

    Yes, twentythirteen is totally unrelated to twentytwelve.

    Thread Starter labisca2012

    (@labisca2012)

    Ok, so if I’ve only thus far altered some of the parent css file, I should find only those modifications and include them in a newly created css that will become the css of a child theme. Going forward any alterations of the css should go here?

    Further, if I understand correctly, updates of WP beyond 3.5.1 may change the engine of how the program runs, which may change things in the base twentytwelve theme out of the box, but shouldn’t change things that are part of my child theme?

    Yep, you got it :)!

    Your child theme is smart – it pulls in necessary changes from the parent.

    Thread Starter labisca2012

    (@labisca2012)

    So, if I didn’t like something about 2013, I could always go back to my child theme of 2012? Would said child theme have preserved my custom menus or would i have to remake those?

    You can always switch from one theme to another and yes, your settings are generally saved for other themes.

    But just to be clear – twentythirteen is in no way related to twentytwelve at all – and even when you update WP, you don’t get switched to twentythirteen (when 3.6 comes out) – it’s just a new option if you want to use it. It will be considered the new “default” theme, but that doesn’t necessarily have anything to do with whatever theme you want to use. It WILL likely have new bells and whistles…but those will be integrated into many existing themes by the developers.

    Thread Starter labisca2012

    (@labisca2012)

    You people are so great. Today’s confusion is clearing. Many thanks.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Creating a child theme – theoretical question’ is closed to new replies.