WordPress.org

Ready to get started?Download WordPress

Forums

WP Minify
[resolved] Doesn't work if using google's jquery (3 posts)

  1. helgatheviking
    Member
    Posted 3 years ago #

    If I use unregister my version of jquery to use the google-hosted version then wp-minify skips the google version of jquery and then all the minified scripts are placed above where jquery is defined. so i get the "jquery is not defined error" and none of my scripts work.

    http://wordpress.org/extend/plugins/wp-minify/

  2. helgatheviking
    Member
    Posted 3 years ago #

    ok fixed by adding:

    function add_minify_location(){
    	if (class_exists('WPMinify')) {?>
    
    <!-- WP-Minify JS -->
    <!-- WP-Minify CSS -->
    
    <?php }
    }
    add_action('wp_head','add_minify_location',99);

    to my functions.php

    per the recommendation at:
    http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#manual_placement

  3. graemeboy
    Member
    Posted 2 years ago #

    Whooo! Thanks helgatheviking, you are THE VIKING! :) Just saved me so much tinkering, I bet ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags