Forum Replies Created

Viewing 1 replies (of 1 total)
  • I had the same issue, and adding this to my functions file fixed it:

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 11 );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array('parent-style')
        );
    }

    With the line:
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 11 );
    You raise the priority the priority to 11, which means the css file is loaded later than it would by default (default priority is 10).

    It is wrong to say that your child style is not loading. Rather, your child style is loading earlier than this style sheet is, after we changed the priority it is loaded with.

Viewing 1 replies (of 1 total)