Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Where is your style.css located? Did you create a new folder just as the twentytwelve folder? –  Sven Jun 29 '13 at 7:38
    
It is in it's own folder, called WAMSA. –  Steve Jun 29 '13 at 8:26
    
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 '13 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 '13 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 '13 at 12:35
show 5 more comments

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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