Loading a stylesheet before the theme css files

Home Forums Support Loading a stylesheet before the theme css files

Home Forums Support Loading a stylesheet before the theme css files

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #192247
    Gabriel

    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!

    #192305
    Tom
    Lead Developer
    Lead Developer

    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 ๐Ÿ™‚

    #192318
    Gabriel

    I’ll look into it, thanks!

    #192337
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.