WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Child Theme Not Working With Twenty Twelve Theme (13 posts)

  1. bwarner44
    Member
    Posted 1 year ago #

    I have created a blog using the Twenty Twelve theme. I have also created a bare bones child theme with Twenty Twelve as the parent and that child theme appears in my Available Themes screen. But when I activate the child theme, the content of the blog is present but the appearance of the Twenty Twelve blog is radically altered even though I have made no changes to the child theme that should affect the Twenty Twelve theme. Thanks for any help to fix this. Here is the code for the child theme:

    /*
    Theme Name: Tearney Warner Child Theme
    Description: Child theme for the Twenty Twelve theme
    Author: Bruce Warner
    Template: twentytwelve
    */

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

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Can you post a link to your site with the child theme active?

  3. bwarner44
    Member
    Posted 1 year ago #

    tearneywarner.com

    The child theme is now active.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    There is no style.css file being loaded

    Something is wrong with your file.

    YOu should have the folder /tearneywarnerchildtheme

    Within that should be a style.css file with your above code

    But that file does not exist or isn't being loaded. If the file is in there, how was it made?

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    The parent style.css file is not being found -- check that your file structure is correct. The child theme goes on the same level as the parent -- not inside it -- for example:

    site_root (www)
            wp-content
                themes (directory where all themes are)
                    twentyeleven (directory of our example parent theme, Twenty Eleven)
                    twentyeleven-child (directory of our child theme; can be named anything)
                        style.css (required file in a child theme; must be named style.css)

    EDIT - Sorry for duplicationg -- missed that while writing this.

  6. bwarner44
    Member
    Posted 1 year ago #

    Here is my file structure:

    site_root (www)
    wp-content
    themes
    twentytwelve
    tearneywarner chile theme
    style.css

    The child theme style.css file contains the code I referred to in my first post.

    As I looked at the child theme css.style code it occurred to me that perhaps the single quotation marks instead of double quotation marks in @import url('../twentytwelve/style.css'); might make a difference. Is that a problem? And if not, what else should I do to fix things?

    Also, does it matter that my child theme folder is titled "tearneywarner chile theme" instead of "tearneywarnerchildtheme"?

    Thanks.

  7. bwarner44
    Member
    Posted 1 year ago #

    The structure as posted does not show the indents I put in the post when I wrote it--don't know why. But site-root is level 1, wp-content is level 2, themes is level 3, twentytwelve and tearneywarner child theme are each level 4, and style.css is level 5.

  8. bwarner44
    Member
    Posted 1 year ago #

    style.ccs is level 5 under tearneywarner child theme

  9. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    I don't believe it is ideal to have spaces in a folder name

    child_theme or childtheme is better than child theme

    I should be able to download your style.css file directly with the url

    http://www.tearneywarner.com/wp-content/themes/tearneywarnerchildtheme/style.css

    But I can't get to it. If I can't get it, the browser can;t get it

    The only 2 things I can think of are that permissions are set wrong on it, so it can;t be loaded

    Or - again I'm wondering how you made the file? I've seen some folks make a file using notepad on a windows machine, and saving it as a text file instead of clicking 'all files'

    That causes the file to technically be named style.css.txt. Best bet is to make the file using something like notepad++ (which is awesome and free) or directly on the server if the hosting interface allows it.

  10. esmi
    Forum Moderator
    Posted 1 year ago #

  11. bwarner44
    Member
    Posted 1 year ago #

    Got the child theme to generally work--still not quite sure what the problem was. But thanks for all your help. But now the contents of the navigation bar is different from Twenty Twelve when I activate the child theme, even though I haven't added anything in the child theme that would affect the navigation bar. In the Twenty Twelve theme I have set up 5 pages, call them A, B, C, D and E, and I have set up a custom menu that has all of those pages in the navigation bar except C. But when I switch to the child theme, all five pages appear in the navigation bar. Is there another file that I should be referencing in the child theme that would pull in the custom menu, or is there some other piece of code that is missing?

  12. bwarner44
    Member
    Posted 1 year ago #

    Figured it out. I had to choose the custom menu again in the child theme. All seems fine now. Thanks again for your help.

  13. pamf
    Member
    Posted 9 months ago #

    Thank you WPyogi. I have spent hours trying to figure out why I couldn't see my child theme so I could activate it. Your comment that the child folder needs to be on the same level as the parent fixed it. I should have known that. Of course, now that I can activate my child theme, it isn't doing what I wanted it to. But that's for another forum.

Topic Closed

This topic has been closed to new replies.

About this Topic