• Resolved wpress2010

    (@wpress2010)


    I successfully created a child theme of the twentyeleven theme, and activated it without changing anything. I’m planning to change the widths on the site a bit, so I copied that part of the default CSS into the child style.css file in preparation for changing some of the values later. This is what’s in the style.css file in the child theme’s folder:

    /*
    Theme Name: Twenty Eleven CHILD
    Theme URI: http://www.mysite.com/twentyelevenCHILD
    Description: A child theme of 2011 default WordPress theme.
    Author: Myself
    Author url: http://www.mysite.com
    Version: 1.0
    Tags: black, blue, white, fixed-width, custom-header, theme-options
    Template: twentyeleven
    */
    
    @import url('../twentyeleven/style.css');
    
    /* =Structure
    ----------------------------------------------- */
    
    /*change widths here */
    #primary {
    float: left;
    	margin: 0 -26.4% 0 0;
    	width: 100%;
    }
    #content {
    margin: 0 34% 0 7.6%;
    width: 58.4%;
    }
    #secondary {
    float: right;
    margin-right: 7.6%;
    width: 18.8%;
    }

    But when I look at either the Live Preview or the activated child theme, the site MENUS are not the same! (Some items do not appear) Do I need to also copy over the PHP files from the original twentyeleven theme folder into my twentyelevenCHILD folder? There’s nothing in the documentation to suggest that this is necessary. I’m just trying to understand how the child themes work…

Viewing 6 replies - 1 through 6 (of 6 total)
  • A child theme is still a new theme. If you have set up any custom menus, you will need to apply them to this theme. Ditto, you will have to add any previous widgets to this theme too.

    Thread Starter wpress2010

    (@wpress2010)

    Hmm. I am not a frequent WordPress user, so this was not obvious to me. But it seems that one can only specify the menu to use when one has already activated the theme.

    When twentyeleven (the default on the site) the options underneath it in the Themes section are shown as: Customize | Options: Widgets, Menus, Theme Extensions, Theme Options, Header, Background.

    When twentyelevenCHILD is INACTIVE, the only choices below it are: Activate, Live Preview, Details and Delete. I can’t see how to properly prepare it for activation without actually activating it!

    If I go ahead and Acitvate the twentyelevenCHILD theme without all of the things it needs from the parent theme, it would look pretty bad until I scrambled to find all of the things that neeed to be copied over to make it fully functional, no? At this point I really only want to adjust the #content and #secondary widths and to apply some CSS to a few other elements.

    Or, could I not just copy the entire twentyeleven theme and its files into a renamed folder, rename twentyeleven in its style.css file, activate it and then modify as I liked? Seems like a klunky way to do it, tho’

    it would look pretty bad until I scrambled to find all of the things that neeed to be copied over to make it fully functional, no?

    No – it wouldn’t “look bad”. Just not the way you want it for 10 minutes or so. You could fork the 2011 theme into a new standalone theme but that way you would lose out on all of the future updates to the main theme. The child theme approach still allows for updates.

    Thread Starter wpress2010

    (@wpress2010)

    It still seems strange to me that the only thing the child theme really inherits is the CSS, NOT any of the other things that have been set or added to the original theme.

    I just want to modify a tiny bit of CSS code. Is there any way to just add an auxiliary CSS file to a theme, and have that auxiliary file sit in the theme’s folder in such a way as to not be affected by future theme updates?

    Install a custom CSS plugin?

    Thread Starter wpress2010

    (@wpress2010)

    THANK YOU! After running through a couple of these that installed but wouldn’t work, I found one that worked perfectly the first time:

    Custom CSS Manager

    http://wordpress.org/support/view/plugin-reviews/custom-css-manager-plugin

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Twenty Eleven child theme: odd behavior’ is closed to new replies.