• Resolved anw618

    (@anw618)


    I created a child theme of Interface a couple of months ago so that I could change the default accent color. When I created this theme, everything was on the up-and-up…when I modified colors on the child theme, it was reflected on the site.

    Interface (the parent theme) was updated a couple weeks ago, and the site was restored to the normal accent colors, despite the fact that my child theme had not changed.

    As a temporary fix on the front end, I went into the parent theme and changed all the colors again until I can get this part fixed.

    What’s weird, though, is that when I went to make another change to the parent theme (assuming the child theme link was broken), it wasn’t reflected on the site. However, when I put that same code in the child theme, it worked.

    So the child theme is not overriding the colors on the parent theme, but it is overriding other styling.

    Does anyone have any ideas why this might be occurring?

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Can you post a link to your site with the child theme active?

    Thread Starter anw618

    (@anw618)

    Everything seems to be working correctly on your site. Can you post an example of some CSS you’ve tried in your child theme that didn’t work?

    Thread Starter anw618

    (@anw618)

    Here’s what I put in my child theme that did not override the parent theme styling. At the time, it did not change the colors of anything.

    content ul {color: #333;}
    
    content ol {color: #333;}
    
    .access a { color: #333;}
    
    p {color: #333;}
    
    .widget ul li a {
        color: #333;
    }

    However, when I tried to include this in the child style sheet a week or so later, it worked:

    .featured-text .featured-title, .featured-content {
    display:none;
    }

    Again, when the initial update occurred, I needed to immediately preserve the branding of the site and so made the color changes directly to the parent (which then were reflected on the site).

    Thanks for your help!

    Your last two rules are working for me, but it looks like you’ve got the wrong selectors in your first three rules. Try:

    #content ul {color: #333; }
    #content ol {color: #333; }
    #access a { color: #333; }
    Thread Starter anw618

    (@anw618)

    Here’s an example. I just went into the PARENT theme and changed

    a {
        color: #775395;
        text-decoration: none;
    }

    to

    a {
        color: #ff0000;
        text-decoration: none;
    }

    The contact us link at the bottom of this page: https://ad-vax.com/about-us/ is red, even though the CHILD theme still has

    a {
        color: #775395;
        text-decoration: none;
    }

    So changes I made to the parent theme are not being overridden by the child theme.

    Make more sense? I understand it must be difficult to figure this out, given that the parent theme and the child theme should be pretty much identical. Here, however, is a small example of my point.

    Thanks for your continued help!

    Here’s another issue. You’ve forgotten the ending bracket after line 47:

    ::-moz-selection {
    	background: #775395;
    	color: #fff;

    should be

    ::-moz-selection {
    	background: #775395;
    	color: #fff;
    }

    The missing end bracket is causing parsing errors all the way down the rest of the stylesheet.

    Thread Starter anw618

    (@anw618)

    Ah, that bracket must have done it. When I was copying and pasting from the parent theme I must have not gone far enough. I added the bracket and the red text changed back to purple.

    Thank you very much!

    Thread Starter anw618

    (@anw618)

    Resolved!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Child theme not overriding parent’ is closed to new replies.