• Resolved acanniere

    (@acanniere)


    I have a Child Theme activated for the Twenty Eleven theme. In the CSS stylesheet it has the code for importing from the Twenty Eleven template.

    If I want to make small tweaks in the CSS/stylesheets, should I do so in the parent page? If so, will the changes stay in place for my child theme activated version when the parent theme is updated?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Never make ANY changes in the parent theme, that’s the point of the child theme

    Simply copy the rule you wish to edit from the parent theme to the child theme, and then make your edits

    Or write entirely new css rules in your child theme

    Any css rules you add to your child css go under the @import line

    Thread Starter acanniere

    (@acanniere)

    What happens if you do make a change in the parent theme?

    The problem is, the editor for the Child Theme only has a stylesheet with this code:

    /*
    Theme Name: Twentyeleven Child
    Description: Child theme for the twentyeleven theme
    Author: …
    Template: twentyeleven
    */

    @import url(“../twentyeleven/style.css”);

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

    How do I add CSS or stylesheet rules to that?

    If you make changes to the parent theme, they get lost when WP is upgraded. To add rules to your existing child theme css just add them to the bottom of your sheet.

    /
    
    @import url("../twentyeleven/style.css");
    
    #site-title a {
    color: #009900;
    }
    #more-rules {
    go: here;
    }

    If you don’t know what rules to edit, you can select twentyeleven from your theme editor, look for what you want to change, copy it, go back to your child theme, paste it, then edit.

    Or do what I do. Download 2011 to your computer so you can look at the whole style.css, and copy rules from there to your child style.css

    Thread Starter acanniere

    (@acanniere)

    Thanks, very helpful. Just did that… though I pasted some old stylesheet rules under the heading section from my old website and it didn’t seem to make any difference.

    One of the main things I’m trying to fix at the moment is the navigation menu under the header which has gone from one line to two. This happened after I got rid of the header text…

    Here’s the site so you know what I mean:

    https://www.andrecanniere.com/Wordpress/

    Is there a magic code I can paste in the stylesheet to rectify this??

    Thread Starter acanniere

    (@acanniere)

    Actually, I think I just solved it by removing the search form from my child theme stylesheet.

    Looks like you did indeed fix it

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Child Theme Question’ is closed to new replies.