2

I created a child theme of twentytwelve using the following in style.css:

/*
Theme Name: WAMSA
Template: twentytwelve
version: 0.1
*/

@import url("../twentytwelve/style.css");

In Appearance > Theme, the template is listed with error:

The following themes are installed but incomplete. Themes must have a stylesheet and a template.

Description: Template is missing.

The codex says only a style.css file is required, which is what I have.

I uninstalled and reinstalled TwentyTwelve theme, without a change.

Why is my child theme not being recognised?

Update.

Here is what I am doing to generate this problem.

  1. Twenty Twelve theme is installed.
  2. I create a folder on my local computer, and create a style sheet style.css inside this folder.
  3. I place the code above into style.css, then I FTP the folder I created up into /wp-content/themes.
  4. When I go to Appearance > Themes, I receive the errors above.

Update2

If I upload this child theme to a different Wordpress installation, it does not become broken.

10
  • Where is your style.css located? Did you create a new folder just as the twentytwelve folder?
    – Sven
    Jun 29, 2013 at 7:38
  • It is in it's own folder, called WAMSA.
    – Steve
    Jun 29, 2013 at 8:26
  • 1
    Well, your code is okay... perhaps you can try to create a child from another theme, just to see if it'll work...
    – Sven
    Jun 29, 2013 at 11:43
  • 1
    Copying your code snippet exactly works just fine for me. Are you sure your folder structure is ok? Do you have Twenty Twelve theme available in installation?
    – Rarst
    Jun 29, 2013 at 15:18
  • Yes, @Rarst, twentytwelve is there. I created a child theme of twentyeleven as well, and receive the same error. twentyeleven is there too.
    – Steve
    Jun 30, 2013 at 12:35

3 Answers 3

3

I found the problem.

I went to edit the stylesheet in Wordpress's editor, and saw that the stylesheet's code had been moved onto 1 line. This meant the top comment section was also on one line, and the Template: twentytwelve was not distinct.

Adding line breaks resolved the problem.

1

I have found that the name of the template is case sensitive:

The original theme name has an upper case. I copied passed it to the template name of my child theme but always got an error of template missing. I also added a line break at the end of the file (I know sometimes programmers have issue with the last line).

I modified the Template name - only small capital letters - and it works.

0

I also just noticed the same error and it was due to me downloading the "Google Page Speed Insights" minified version of my style.css

Your Answer

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

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