How to use jQuery 1.4 by default on your WordPress blog

As you maybe know, the new jQuery version (1.4) is out. But until the next update, your WordPress blog will still use the old jQuery version. This recipe will show you how to easily replace your current jQuery version by the newest 1.4 version.

Simply paste the following code on your functions.php file:

if( !is_admin()){
   wp_deregister_script('jquery');
   wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false, '');
   wp_enqueue_script('jquery');
}

Leave a Reply

Your email address will not be published. Required fields are marked *