WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't get child theme to recognized parent style (13 posts)

  1. Susan Jane
    Member
    Posted 12 months ago #

    I've watched the tutorial through lynda.com, ready numerous postings, followed them all to the t, or so I thought because it's not working!

    Here's what I have in my style.css file in my child folder:
    /*

    Theme Name: Child of Twenty Twelve
    Description: SJ's tweaks of Twenty Twelve
    Author: SJ Hylton LeHoven
    Template: twentytwelve
    Version: 0.0.1

    */

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

    I know I did the child folder right because I was able to move the header to above the menu.

    I've changed the text above a zillion times trying all kinds of recommendations I read, but so far nothing's worked.

    Please thank you so much for any tips of what I've done wrong. This is new to me, and I'm determined to learn it. I'm actually enjoying the process and just consider this a small bump in the road.

    Mahalo,
    -sj

  2. Triptripper
    TutsKid Ninja
    Posted 12 months ago #

    Try double quotes?

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

  3. Susan Jane
    Member
    Posted 12 months ago #

    Sure!
    Did that before and I'll try it again.
    Fingers are crossed . . .

  4. Susan Jane
    Member
    Posted 12 months ago #

    Nope . . . it's the same.
    Thanks for the suggestion though.
    Any others?
    Here's a question. Appearances to themes. I see the child theme made on the top line; the twenty twelve theme is below. Is there any type of setting that needs to be turned on so that BOTH are activated at the same time?
    I understand that the style.css file is stating that it's a child theme of the template: twentytwelve, but why then is the 2012 theme below the child theme in the aforementioned window? And the activate button can be clicked. (and when I've done so, it gets rid of the child theme and I'm back to square one . . . which is much better than square nothing at least).
    Mahalo

  5. Triptripper
    TutsKid Ninja
    Posted 12 months ago #

    Is there any type of setting that needs to be turned on so that BOTH are activated at the same time?

    You just need to set the child theme as the active theme in your admin area (Appearance > themes).

    What do you see when you click the preview button of your child theme when not activated?

    I know I did the child folder right because I was able to move the header to above the menu.

    Which header? and what menu?

    is the location of your child theme's style.css:

    /wp-content/themes/the-folder-name-you-used/style.css

    http://codex.wordpress.org/Child_Themes

  6. Krishna
    Volunteer Moderator
    Posted 12 months ago #

    And the activate button can be clicked. (and when I've done so, it gets rid of the child theme and I'm back to square one

    No, it does not get rid of the child theme. But it will look like the parent theme if you have not customized the theme. Try adding some of your own CSS to your child theme's style.css and see if it changes anything.

  7. Susan Jane
    Member
    Posted 12 months ago #

    Okay, did that. Child theme is the active theme.

    I see the same thing as I see now--the header moved to the top over the menu and a "plain" style, not the 2012 style (go to sjlehoven.com to see).

    The header is one I have as a placeholder for my final one. From the same lynda.com tutorial, I learned how to copy the header.php data from the parent file into a new file in the child folder. I then cut and paste the html instructions for the location of the header. I did it just like the tutorial explained, and it worked. That's part of what is vexing because I also followed the steps for the style file, but it didn't work (i.e. the style from the parent file is not showing up in the child theme).

    Yes, the child them folder is in the wp-content folder with the other themes. Inside is the style.css them with the copy pasted in my first post, as well as the copy of the header.php with the change I also mentioned above.

    Anything else it could be?

    Mahalo

  8. alchymyth
    The Sweeper & Moderator
    Posted 12 months ago #

    for some reason, the style.css of your child theme is not found under:

    /wp-content/themes/childoftwentytwelve/style.css

    double-check your folder structure and names;
    make sure the capitalisation is right, that there are no spaces in the folder names, etc...

  9. Susan Jane
    Member
    Posted 12 months ago #

    Could it be then the way that I'm saving the style.css file in text wrangler?
    In the tutorial he says it save it as a css file, but that's not an option in text wrangler. I added the tag .css after the file name (for style.css).
    The default in Text Wrangler is Unicode (UTF-8). It also shows Western (Mac OS Roman).

    This might be the problem. Advice?
    How can I make a textwrangler file a .css file?
    Mahalo

  10. esmi
    Theme Diva & Forum Moderator
    Posted 12 months ago #

    You should be using ANSII - not UTF-8 - for .css files.

  11. Susan Jane
    Member
    Posted 12 months ago #

    Thank you. Looking now to see how to save the file as ANSII.
    Really, really appreciate your input.

  12. Susan Jane
    Member
    Posted 12 months ago #

    That was it! Thank you!

    I wasn't able to figure out how to save a text wrangler file as an ANSII file, BUT I was able to figure out how to make a Text Edit file ANSII.

    Thanks again everyone.

  13. esmi
    Theme Diva & Forum Moderator
    Posted 12 months ago #

    Glad we could help :-)

Reply

You must log in to post.

About this Topic