0

I'm working on a website for my mom and I'd like to create a child theme to customize the theme I've found for it. I made a new folder in /wp-content/themes/ and created a new file in it called style.css. I copied the code from another website and changed all the details to fit with my template and my new theme. Went back to WordPress and found it listed under Broken Themes because Stylesheet is not readable.

I checked for spelling, capitalization, and punctuation issues. I make sure the file and folder are in the right places. They are. I pair down the code until it's just the following.

/*
Theme Name: theme-child  
Template: theme  
*/

Still broken. Okay, fine. Maybe it's the parent theme. So I go and download a different theme, one I don't like as much. Go through the same process to create a child theme for the new theme. That one also shows up as broken because Stylesheet is not readable.

What am I doing wrong? I want to do the right thing and customize the child theme instead of the parent, but it's looking like that just isn't an option.

3
  • writing Template: themeName means that the parent theme is in /wp-content/themes/themeName
    – mmm
    Aug 3, 2015 at 9:31
  • Have you checked out codex.wordpress.org/Child_Themes yet? Try to follow along with the example there and see if you can create a basic Twenty Fifteen child theme. If that works, you can apply that code towards your other child theme. Aug 4, 2015 at 1:52
  • Have you check that you didn't add space when create folder of child theme or when create style.css? or check permission once.
    – Sonali
    Feb 25, 2017 at 11:40

1 Answer 1

1

The template name needs to match exactly the directory name of the parent theme, and you need a functions.php file in the child theme folder.

IE:

/*
 Theme Name:   Twenty Fifteen Child
 Template:     twentyfifteen

*/

...or just use this plugin: https://wordpress.org/plugins/child-theme-configurator/

and look at the child theme it creates to learn how to do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.