Archived topic
Enqueueing Minified CSS in my Child Theme
3 replies · Started by antware on April 3, 2020
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.
Hi there,
You could do this:
add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_style( 'generate-child' );
} );
Let me know :)
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.
No problem, glad I could help!
Great to hear - lots of great plans for GenerateBlocks :)