Archived topic
Loading a stylesheet before the theme css files
3 replies · Started by Gabriel on May 6, 2016
Viewing posts 1–4 of 4
Hi Tom!
I'd like to use the w3.css framework along with GeneratePress. However, I'd like the the w3.css file to be loaded before the GeneratePress styles, so the Generate styles will override some of the w3.css stuff.
How can I achieve that? I'm currently using a child theme and I'm a total noobs.
thanks!
Hi there,
You could set a high priority to your enqueue function:
add_action( 'wp_enqueue_scripts','your_custom_scripts', 1 );
function your_custom_scripts()
{
wp_enqueue_style( 'w3', 'URL TO THE FILE', false, '1.0', 'all' );
}
Something like that should do it :)
I'll look into it, thanks!
You're welcome :)
This archived topic is closed to new replies.
