Remove Wordpress Bundled / Included jQuery

Remove WordPress Bundled / Included jQuery

Recently, from version 3 and onwards WordPress has included or bundled a load of javascript with it, this is found in:  wp-includes/js/

This list includes scripts such as

  • jQuery
  • scriptaculous
  • hoverIntent
  • prototype
  • colorpicker
  • json
  • swfobject

and more.

Unfortunately WordPress is forcing everyone to use jQuery version 1.4.2 with abit of a ignorant attitude, quote one forum moderator:

WordPress 3.0 will include 1.4.2, de-registering and adding your own is just totally pointless(seeing as that’s current).

Not quite, since some people need to use a pre 1.4.2 version.

Anyway to cut a long story short, here’s the Fix to Removing the Bundled jQuery that comes with WordPress:

Edit you’re themes functions.php

goto the end of the document and find ?>

before that paste:

if( !is_admin()){
wp_deregister_script('jquery');
}

Save, and upload.

And that’s it, you’re done.

Seems to have not hurt anything in the admin backend, but if you encounter any bugs or issues please let me know!

Also you can try this:
if( !is_admin()){
wp_deregister_script('jquery');
wp_register_script('jquery', (""), false, '');
wp_enqueue_script('jquery');
}

Wootheme Users

Open your functions.php file, find:

/*-----------------------------------------------------------------------------------*/
/* You can add custom functions below */
/*-----------------------------------------------------------------------------------*/

And paste:

if( !is_admin()){
wp_deregister_script('jquery');
wp_register_script('jquery', (""), false, '');
wp_enqueue_script('jquery');
}

Below it 🙂

 

Leave a Reply

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