Tagged: concatenation, CSS, enqueue
Hi,
I would like to concatenate all the avia css files that appear in the <head> without using any plugin as MinQueue (I want to keep control of the order).
You use a function in the functions.php file to enqueue all the scripts. How can I modify it in my child theme file to concatenate all those files?
Here is the files list:
wp_register_style( 'avia-custom', $template_url."/css/custom.css", array(), '2', 'all' );
wp_enqueue_style( 'avia-grid' , $template_url."/css/grid.css", array(), '2', 'all' );
wp_enqueue_style( 'avia-base' , $template_url."/css/base.css", array(), '2', 'all' );
wp_enqueue_style( 'avia-layout', $template_url."/css/layout.css", array(), '2', 'all' );
wp_enqueue_style( 'avia-scs', $template_url."/css/shortcodes.css", array(), '2', 'all' );
wp_enqueue_style( 'avia-popup-css', $template_url."/js/aviapopup/magnific-popup.css", array(), '1', 'screen' );
wp_enqueue_style( 'avia-media' , $template_url."/js/mediaelement/skin-1/mediaelementplayer.css", array(), '1', 'screen' );
wp_enqueue_style( 'avia-print' , $template_url."/css/print.css", array(), '1', 'print' );
Thank you!
Cheers
Hey Mercheric!
The BWP minify plugin, https://wordpress.org/plugins/bwp-minify/, let’s you control the order and pick and choose which gets minified.
Best regards,
Elliott
Thank you, Elliott. I’ll take a look.