Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Child theme stopped working

Discussion in 'Misc WordPress Requests' started by bcworkz, Dec 20, 2017.

  1. bcworkz


    Reply To: Child theme stopped working, by bcworkz

    When WP_DEBUG is true, PHP error messages are displayed where they occur on page output, they “come up”. I don’t know why I phrased it that way. Usually the messages are quite obvious. On occasion they are hidden. You can check your error logs to be sure.

    I do see that the child CSS is loaded after the parent, as is expected and proper. I did notice that the entire parent CSS is duplicated in the child. This is unnecessary and wasteful, you only need the specific rules you want overridden in the child file, not all rules. Other than being inefficient, it shouldn’t make any difference, but I can’t help but wonder if it might.

    Maybe you should try setting the current child style.css aside for now and creating a new one with only a few overridden rules as a quick test. If these few rules are able to take precedence, I might be onto something. It’s a long shot. What could be happening with two sizable, similar CSS files is a race condition develops where the CSSOM is completed with the first file’s rules before the second file finishes loading, allowing the first found rules to take precedence. There’s no reason it should happen this way, but I’ve nothing else.

    If that test makes a difference, I advise you to use diff or similar to extract out just the overridden rules in order to compose a proper child CSS file. This is something you ought to eventually do anyway, but if it is not going to help the rule application, there’s little reason to do so right now.

    The only other thing I can suggest is to try using more specific selectors for any rules that fail to override as equivalent selectors. For example, your title’s .blog-title rule (line 251 of the child file). Try changing the selector to h1.blog-title to make it more specific. Being more specific, it wouldn’t matter what order the files load in, it should take precedence.

    Reply To: Child theme stopped working

Share This Page

Monarch Social Sharing Plugin