Have you checked your custom.css $deps first?
Thread Starter
Bondye
(@bondye)
I don’t know what you mean by checked my custom css.
This is what I have:
function enqueue_scripts() {
wp_enqueue_style(‘bootstrap’, ‘http://maxcdn.bootstrapcdn.com/bootswatch/3.2.0/flatly/bootstrap.min.css’);
wp_enqueue_style(‘custom’, get_stylesheet_uri(), array(‘bootstrap’));
}
add_action(‘wp_enqueue_scripts’, ‘enqueue_scripts’);
Result:
<link rel=’stylesheet’ id=’bootstrap-css’ href=’http://maxcdn.bootstrapcdn.com/bootswatch/3.2.0/flatly/bootstrap.min.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’custom-css’ href=’http://localhost/wp-content/themes/mytheme/style.css’ type=’text/css’ media=’all’ />
When “Load CSS asynchronously” enabled:
<style type=”text/css” media=”all”></style><style type=”text/css” media=”all”>[my css]</style><link rel=”stylesheet” href=”http://maxcdn.bootstrapcdn.com/bootswatch/3.2.0/flatly/bootstrap.min.css” type=”text/css” media=”all” />
Can you confirm if using version 2.3 the problem persists?
Thread Starter
Bondye
(@bondye)
The problem is still there.
Using “Load CSS asynchronously” my custom script is loaded first. Even when I using $deph wp_enqueue_style('custom', get_stylesheet_uri(), array('bootstrap'));
Thanks to let me know. I will try to reproduce a similar circumstances on my installation to identify the problem.
Best