php - enque css scripts in wrong order in wordpress -


i creating wordpress childtheme. have style.css in childtheme , using this: wp_enqueue_style( 'parent-style-bob', get_template_directory_uri() . '/style.css' ); bring in style.css parent - 2016 in case. working fine far can tell.

i want add separate responsive css style sheet after childtheme/style.css (for development purposes)

if add function wp_enqueue_style( 'responsive-bob', get_stylesheet_uri() . '/styles-responsive.css' ); comes in before childthemes css file.

how order right please?

here's whole function:

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() {    wp_enqueue_style( 'parent-style-bob', get_template_directory_uri() . '/style.css' );    wp_enqueue_style( 'responsive-bob', get_stylesheet_uri() . '/styles-responsive.css' ); } 

you can "wait" child style load , load stylesheet, ie, make stylesheet dependant on child style. child style handle twentysixteen-style

you can following

wp_enqueue_style( 'responsive-bob', get_stylesheet_directory_uri() . '/styles-responsive.css', array( 'twentysixteen-style) ); 

Comments

Post a Comment

Popular posts from this blog

filehandler - java open files not cleaned, even when the process is killed -

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -