[Plugin: WP Minify] No files get minified
-
I use the preferred way to enqueue scripts, but still only a few CSS files get minified and none of my theme JS files get recognized by WP Minify. Here’s how I define my JS files:
function gholumn_scripts() { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', null, '1.7.2', true); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'google-font-loader', get_template_directory_uri() . '/js/fontloader.js', null, null, false); wp_enqueue_script( 'jquery-ui-gholumns', get_template_directory_uri() . '/js/libs/jquery-ui-1.8.18.custom.min.js', array('jquery'), '1.8.18', true); wp_enqueue_script( 'jquery-throttle', get_template_directory_uri() . '/js/jquery.throttle.min.js', array('jquery'), null, true); wp_enqueue_script( 'gho-coolcolumns', get_template_directory_uri() . '/js/jquery.gho.coolcolumn.js', array('jquery'), null, true); wp_enqueue_script( 'gho-coolcontent', get_template_directory_uri() . '/js/jquery.gho.coolcontent.js', array('jquery'), null, true); wp_enqueue_script( 'gho-coolcontent-freetext', get_template_directory_uri() . '/js/jquery.gho.coolcontent.freetext.js', array('jquery'), null, true); wp_enqueue_script( 'gho-coolcontent-people', get_template_directory_uri() . '/js/jquery.gho.coolcontent.people.js', array('jquery'), null, true); wp_enqueue_script( 'gho-permalinkhandler', get_template_directory_uri() . '/js/gho.permalinkhandler.js', array('jquery'), null, true); wp_enqueue_script( 'gho-plugins', get_template_directory_uri() . '/js/plugins.js', array('jquery'), null, true); wp_enqueue_script( 'gho-script', get_template_directory_uri() . '/js/script.js', array('jquery'), null, true); } add_action('init', 'gholumn_scripts');
And yes I also tried to remove the
$in_footer = true
argument with every wp_enqueue_script call but also that didn’t help. In fact, that made it worse, as nothing was included anymore when I did that.Settings in WP Admin are good: JS, CSS and HTML minification are all on. I tried with and without the option to put it in the footer (although WPM does not recommend footer placement).
What am I doing wrong?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Plugin: WP Minify] No files get minified’ is closed to new replies.