• Okay. Bear with me, please.

    I’m using Twenty Sixteen as my, er, base theme and created a child theme but I keep finding that WordPress throws a wobbly with it and I get this message on the Manage Themes screen:

    Template is missing. Standalone themes need to have a index.php template file. Child themes need to have a Template header in the style.css stylesheet.

    I’ve had it a couple of times but I’m not entirely sure what’s cleared it in the past. I know I’ve deleted my child, made another default theme active, then uploaded my child again and all is well. For a bit. Then, oh, oh, WordPress deactivates my child and I’ve got the “Broken Theme” message message.

    In my child folder I have: footer.php (because I messed with it to suit me); functions.php (because I messed with it to suit me) and style.css.

    So the bit about styles.css in the message is a red herring.

    But nothing I’ve read about Child Themes says I should have an index.php in there. Should I??

    I did notice, as I poked around the themes folder on the server, that there’s an index.php in the root. Mind, it’s only three lines long, contains a commented out line and doesn’t have a closing php tag.

    Have I dropped that in there inadvertently? Should there be more content to it?

    I’m kinda lost, here, but figure I’ve misinterpreted or accidentally moved or deleted something along the line.

    Any steers warmly appreciated because, when it works, it works. And is cool.

    Ta.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Sainkho

    (@sainkho)

    I should add, the child theme runs okay for a day or two and I’ve been able to get the style.css the way I want it. But, then, after that day or so, it goes all broken message on me.

    Thread Starter Sainkho

    (@sainkho)

    Oh, more research and I see that the index.php in the root of the Themes folder is supposed to be there and be so brief with its content.

    So, why do I get this infernal Broken Theme message??

    Thread Starter Sainkho

    (@sainkho)

    For the possible benefit of others, I discovered someone else with a similar issue and their solution was as simple as simple could be.

    In the header (is it?) that goes in the child’s style sheet, I’d got a single space between a colon and the reference to the parent theme’s name. A single space!! Removing it stopped the whole broken theme malarkey, dead in it’s tracks.

    A single space!

    Meh.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘All okay with child then “Broken theme” message.’ is closed to new replies.