Child theme error “Template is missing”

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:

Read More

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.

Related posts

3 comments

  1. 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.

  2. 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.

  3. 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

Comments are closed.