I have inherited the job of editing my agency's webpage. I didn't create the site, and I am not sure whether the IMW custom theme that is active is a child type theme for 2011, or whether all customizations up to this point have been made to the original theme. Do need to create a child theme for this site, how to do that considering all the customizations that have already been applied.
What do I need to provide to support for answers
I read some of the answer posts but still am unsure. So If I do not see "Child" in the CSS, then it is not a child theme? I was thinking that maybe the IMW Custom theme was a child theme itself based on the 2011 theme, just without the word child being used to designate it as such. IF IT IS NOT A CHILD THEME, then all of the customizations up to this point have been done to the theme itself. How would I go about creating a child theme from this point? I am so confused.
I have inherited the job of editing my agency's webpage. I didn't create the site, and I am not sure whether the IMW custom theme that is active is a child type theme for 2011, or whether all customizations up to this point have been made to the original theme. Do need to create a child theme for this site, how to do that considering all the customizations that have already been applied.
What do I need to provide to support for answers
I read some of the answer posts but still am unsure. So If I do not see "Child" in the CSS, then it is not a child theme? I was thinking that maybe the IMW Custom theme was a child theme itself based on the 2011 theme, just without the word child being used to designate it as such. IF IT IS NOT A CHILD THEME, then all of the customizations up to this point have been done to the theme itself. How would I go about creating a child theme from this point? I am so confused.
Share Improve this question edited May 12, 2014 at 15:05 s_ha_dum 65.6k13 gold badges84 silver badges174 bronze badges asked May 11, 2014 at 14:58 adminadmin 611 silver badge2 bronze badges 2 |3 Answers
Reset to default 11- Read the stylesheet. A child stylesheet must have
Template: somethemename
to function as a child theme. - Look in Appearance -> Themes. A child theme should have a notice about requiring a parent theme.
Use code similar to this (note: debugging only):
add_action( 'wp_head', function () { if (get_template_directory() === get_stylesheet_directory()) { echo 'not a child'; } else { echo 'child'; } } );
Reference:
http://codex.wordpress/Child_Themes
Since WP 3.0 there is a function is_child_theme() that returns a bool value.
If you cannot find any CSS in the Appearance > Customize > Additional CSS section, but the current theme has clearly been modified from another theme, follow the Wordpress guide on Creating a Child Theme from a Modified Existing Theme.
The Wordpress explanation clearly walks through how to use a DIFF tool to identify where changes have been made. Keep in mind that this does assume you can find the original, unmodified theme. There's a link to a "worst case scenario" tutorial, which sounds like what you might be facing.
style.css
has the following tag at the topTemplate: parent theme name here
– Wyck Commented May 11, 2014 at 15:02