• Resolved mikeill

    (@mikeill)


    In a child theme, trying to override a few of the customizr styles (body bgcolor, color, etc) on the front page of the install and can’t seem to figure what the handle that is associated with the customizr (Blue) stylesheet:

    add_action('wp_enqueue_scripts', 'front_page_design');
        function front_page_design() {
            if ( is_front_page() || is_home()){
                wp_register_style( 'home_page_style', get_stylesheet_directory_uri() . '/index-style.css', 'customizr-skin' );
                wp_enqueue_style( 'home_page_style' );
                }
            }

    Right now I’m just using !important in the css.

    Have searched the parent code for all wp_enqueue_style calls. No luck so far.

Viewing 4 replies - 1 through 4 (of 4 total)
  • !important is rarely needed. It’s simply a case of being more specific with the overriding CSS. If you give us an example of some CSS you’s having problems with (and a link to your site), we can suggest something that would avoid using !important. (Sometimes, it’s inevitable, but it’s rare with Customizr, as nikeo (rightly) uses !important rarely.)

    I agree with EF, probably your issue resides somewhere else.
    Anyway if you use 'customizr-skin' as dep your ‘home_page_style’ will be loaded after the skin, if you use 'customizr-style' it will be loaded after the child-theme style.css, if you don’t use deps.. it will be loaded before them.
    And no look with the search for wp_enqueue_style in the parent code? How do you searched it?
    https://themes.trac.www.ads-software.com/browser/customizr/3.1.15/inc/class-fire-resources.php#L36

    Thread Starter mikeill

    (@mikeill)

    If I had Read TFM on wp_enqueue_style I would have seen that the $dependency handle actually has to be an array. So the following update corrects the code:

    wp_enqueue_style( 'home_page_style', get_stylesheet_directory_uri() . '/index-style.css', array('customizr-skin') );

    Yep, sorry didn’t read your code carefully ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Handle for Customizr Style for use in Dependency Load Order Code’ is closed to new replies.