[Resolved] Enqueueing Minified CSS in my Child Theme

Home Forums Support Enqueueing Minified CSS in my Child Theme

  • This topic has 3 replies, 2 voices, and was last updated 2 months ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1225605
    antware

    Hi guys, I’ve tried to enqueue a minified version of my child theme’s style.css file, but when I view page source on my site I notice the child theme style.css (id=’generate-child-css’) is being implemented above my enqueued minified stylesheet (style.min.css) which I minified in VS Code.

    I only want the minified version to be enqueued. Obviously I’ll do this just before making the site live, and will use the normal style.css during development.

    Please advise.

    #1225711
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You could do this:

    add_action( 'wp_enqueue_scripts', function() {
        wp_dequeue_style( 'generate-child' );
    } );

    Let me know 🙂

    #1226444
    antware

    Thanks Tom, that worked a treat.

    Love your work. Doing my best to get my team where I now work to embrace GeneratePress and GenerateBlocks (once it goes premium with features like accordion, tabs etc.). They currently have a bespoke framework they use, which was developed by a previous employee. So no more support, documentation etc.

    So hopefully they’ll make the switch soon.

    Thanks again.

    #1226826
    Tom
    Lead Developer
    Lead Developer

    No problem, glad I could help!

    Great to hear – lots of great plans for GenerateBlocks 🙂

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