Ask your WordPress questions! Pay money and get answers fast! (more info)

Can I make any Wordpress theme a child theme? WordPress

  • SOLVED

Can I make any Wordpress theme a child theme?

If so, what do I need to do?

1. Create child theme folder and add to /themes directory.

2. Create style.css, reference parent theme, and place in /themes directory

3. Add screenshot

4. Add functions.php

Anything else I am missing?

Can I do this with any WP theme?

Thanks !!
Matt

Answers (4)

2013-10-16

Leslie Bogaerts answers:

Yes you can make a child theme for every theme, honestly, I haven't found one I couldn't. I have even created a child theme for a child theme at one occassion (on request for a client).

Only the style.css is necessary (a screenshot isn't a necessity but it's nice for reference in the theme page in your wp-admin, the functions.php is needed if you want to add additional functions to your theme), you can add files as needed (home.php, index.php, archive.php ...) if you want those to look different then the one from the main theme.

2013-10-16

Remy answers:

You can see the [[LINK href="http://codex.wordpress.org/Child_Themes"]]codex page for Child theme[[/LINK]]. It works with any WP Theme, but some will be simpler to use as parent theme than other.

The only thing required for a child theme is the style.css file and the reference to the parent theme in it. If you don't want to redefine the entire CSS, you can either copy/paste the parent CSS, or use @import.

2013-10-16

Galia Bahat answers:

Almost. You can't make a child theme to a child theme.
You don't need a screenshot BTW, just style.css with the relevant details in the comment (as Remy said) and functions.php .

2013-10-16

Eric P. answers:

I'll mostly agree.

If your purpose for the child theme is CSS changes, you can do that with a child them with only the style.css file.

I always start that with an @import ../{parent-theme}/style.css.

I have no idea why WordPress doesn't automatically enqueue the template_url()/style.css before the child theme stylesheet_url()/style.css. That seems like a bug to me, but it's been that way from the beginning, and changing would break too many child themes

For functions and php, I have encountered some parent themes which were impossible. The worst are some of the most expensive "premium themes" out there. Some of those are "ports" of a foreign template framework into a WordPress environment, and they are so poorly done that they just plain don't work at all with child themes.

The best parent themes prefix all functions and classes with an if defined construct and allow the child theme version to override the one in the parent theme.

Some other themes are old enough that they use stylesheet_url() and stylesheet_dir() when they should use template_url() and template_dir(). Those generally won't work as parent themes at all, and your child theme will become an empty theme with an older or poorly written parent theme like that.

When developing child themes, I strongly prefer the twenty-ten, twenty-eleven, twenty-twelve, twenty-thirteen series for parent themes, and I've had the best results with other open source (free) themes with large installed bases and good reviews. "Premium themes" are often problematic in my experience, and the more you spend, the more problems you seem to get.