• Hello

    I am using a plugin called Connections Business Directory and recently noticed that my own CSS code was being overridden by that included in the plugin.
    After looking into this I soon found out that a CSS file belonging to the CBD plugin was the last to be called in the HTML code – thus giving it precedence over the code of the child theme I had made.
    This change came into place after an update, either of the CBD plugin or Customizr.

    Seeing how I am running a child-theme based on Customizr shouldn’t style.css be the last CSS file included?

    Regards
    Ludwig T

Viewing 2 replies - 1 through 2 (of 2 total)
  • customizr child theme is called after customizr skin (say blue.css).
    To override plug-in css rules you need more specific rules in your css

    Steven

    (@shazahm1hotmailcom)

    @ ludwigt

    CSS files should be loaded on the WP wp_enqueue_scripts action hook. When theme dev’s and plugin dev’s hook their CSS, they can opt to set load priority or not. My experience has been that most simply leave the default priority and let WP load them in the order they were enqueued as WP “starts”, WP “starts” everytime you load a page. This is what I do with CBD.

    Basically this means the order can appears random.

    You said CBD was overriding theme CSS, can you share a link showing it? I prefix all the CSS statements with the ID of #cn-list. So for there to be a conflict, the would have to use that too. Any way, If I can see the conflict, maybe I can offer you a solution.

    A thought … since the CSS for CBD is being loaded last, you could use the method I outline here:
    https://connections-pro.com/2014/05/04/quicktip-custom-css/

    The custom CSS loaded by CBD would come after its core CSS file.

    … Any way, just a thought.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS files calling order in Customizr child theme’ is closed to new replies.