Support » Theme: Sela » Menu Bar changed back to default color

  • Resolved Deanna

    (@busy-little-bird)


    I’ve been using the Sela theme about a week, and am making customizations using a child theme.

    I changed the menu bar color to match my logo, and it worked fine for several days, until yesterday it changed back to the default color. My code shows the color I want.

    .main-navigation ul.nav-menu {
    	color:#66bcb0;
    	font-size:18px;
    	font-weight:bold;
    	text-align:center;
    	}

    I’m a beginner, so I’ve probably picked up the wrong piece of code, but I can’t seem to find the right one. I’ve read through every one of the other posts in this forum, but nothing works to correct it.

    http://www.abusylittlebird.com

Viewing 7 replies - 1 through 7 (of 7 total)
  • There are a few issues here.

    First, there is missing CSS syntax on the last line of child theme stylesheet. This might be the reason why other CSS doesn’t work right.

    #mailchimp input[type="submit"]:hover { color: #F2C

    Another issue is that there are double child stylesheets enqueued in the head, you can see that by viewing page source, this resulted in unnecessary duplication, and since there are some @import in child stylesheet, those are loaded double too.

    This theme (Sela the parent theme) uses get_stylesheet_uri() in its function, meaning that it loaded child stylesheet by default if child theme is in use, so in our child theme there is no need to enqueue child stylesheet, we only need to enqueue parent theme stylesheet as in the first example code in child theme codex page.

    Sela (the parent theme) uses get_stylesheet_uri()
    https://themes.trac.wordpress.org/browser/sela/1.0.5/functions.php#L190

    Child theme codex page (use first example code, don’t use the second one)
    https://codex.wordpress.org/Child_Themes

    Thread Starter Deanna

    (@busy-little-bird)

    Yikes! I have no idea what all this means. I must be a beginner beginner…

    What do I do to fix it?

    Please forget the first remark in my previous comment. There is nothing wrong with the last line of your child theme style.css, it’s just that the semicolon is missing which is ok since there is no more property for that selector but it’s not a good practice, and the last closing curly bracket is at a new line which I didn’t see it at first.

    But still, there are double sets of child theme stylesheets loaded in the head, so please review how your child theme enqueue the stylesheet. When done right, there will be only 1 child theme stylesheet loaded in the head.

    Here is the CSS code to change the menu bar color to match your logo.

    /***** menu bar background color *****/
    .main-navigation { background-color: #66bcb0; }
    
    /***** menu bar font size *****/
    .main-navigation a { font-size: 18px; }
    Thread Starter Deanna

    (@busy-little-bird)

    Thank you! The banner is now the proper color.

    I’ll have to do some more reading about the child theme issue. This afternoon, when I tried to make a correction, I got the white screen, and couldn’t access my dashboard at all. 🙁

    After a 45-minute panic, I figured out how to find the file in my server and correct it there. At least you’ve steered me in the right direction.

    Moderator Kathryn Presner

    (@zoonini)

    Hi there, are you all set with this now? Your site is looking very nice!

    paulwpxp – thanks a lot for helping out!

    Thread Starter Deanna

    (@busy-little-bird)

    Kathryn – I got most of the bugs worked out. I’m still not sure what to do about the child theme duplication. That’s an issue I wasn’t even aware of. After yesterday, I’m afraid to mess with it again…

    Anyway, the banner color issue is solved.

    Moderator Kathryn Presner

    (@zoonini)

    OK, glad you got your banner colour sorted.

    If you’d like to troubleshoot the child-theme issue, let me know. I took a brief look but I’m not sure I see an issue, but it’s possible I’m not seeing what paulwpxp is seeing.

    Looking at your child theme’s stylesheet, the @import statements are for fonts, not for the parent’s stylesheet.

    http://abusylittlebird.com/wp-content/themes/sela-child-theme/style.css

    If you’re not having any issues, I’m not sure you need to change anything at this point.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Menu Bar changed back to default color’ is closed to new replies.