WordPress.org

Ready to get started?Download WordPress

Forums

Broken Theme - Stylesheet missing (4 posts)

  1. MrsHanna
    Member
    Posted 1 year ago #

    Firstly, I just want to say I am a complete novice and have been reading furiously on how to make a child theme.

    Secondly I am using instantwp, not sure if this would make a difference or not.

    I have been reading the how to's on wordpress and have made a child theme for twentyeleven.

    I have created a notepad file and called in style.css

    I have copied and pasted this code from wordpress's how to (just to see if I can get a child theme working before I tackle what I would really like to change)

    /*
    Theme Name: Twentyeleven Child
    Description: Child theme for the twentyeleven theme
    Author: Your name here
    Template: twentyeleven
    */

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

    #site-title a {
    color: #009900;
    }

    I have saved this wordpress/iwpserver/htdocs/wordpress/wp-content/themes/twentyeleven-child

    This is the message I am getting

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

    Name Description
    twentyeleven-child Stylesheet is missing.

    I am utterly sure that I have made a rooky error somewhere and would really really appreciate someone telling me where as I am totally pulling my hair out now.

    I will be extremely grateful for any help you can give me.
    Thanks
    Chantal

  2. ClaytonJames
    Member
    Posted 1 year ago #

    Seems like what you have done should probably work okay with instant wordpress. The directory name is okay, and the style sheet content for the child theme appears okay.

    Just double check one thing; take a look at the style sheet inside of your /twentyeleven-child directory, and make sure that windows actually saved it as a .css file and not a plain text file. If your style sheet is a .txt instead of a .css file, wordpress will give you the error message you describe.

    [edit] just a footnote: if you save a .txt file from within notepad using the name style.css, it might still be saved as a .txt file with the name style (but it's still a .txt extension) If you save the file from notepad with quotation marks - "style.css" - then notepad will save it with the .css extension and the name will simply appear as style, with probably a small gear or cog image on the file icon. It's a long-shot, but something to check.

  3. MrsHanna
    Member
    Posted 1 year ago #

    Thank you Clayton you've been a big help.

    it worked, the "style.css" bit

    although it got rid of my header and background so I am guessing I have to put them in my style sheet now :)

    Big learning curve ahead for me.

    Thank you again, now I can start learning how to build my child theme properly :)

  4. ClaytonJames
    Member
    Posted 1 year ago #

    You're welcome.

Topic Closed

This topic has been closed to new replies.

About this Topic