If you want to speed up your WordPress site you should be using Google to host the common JavaScript libraries.
Remove the WordPress jQuery version and add the Google's.
Add the following lines to your functions.php (inside your template folder).
if ( !is_admin() ) {
// First jQuery
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', false, '1.4.2', false ); // load in footer - true
wp_enqueue_script( 'jquery' );
// Now Prototype (if you're using it)
wp_deregister_script( 'prototype' );
wp_register_script( 'prototype', 'http://ajax.googleapis.com/ajax/libs/prototype/1.6.1/prototype.js', false, '1.6.1', false ); // load in footer - true
wp_enqueue_script( 'prototype' );
// Removing more Scripts...
wp_deregister_script( 'scriptaculous-effects' );
}
bbPress
This code can be also used in bbPress . You just need to replace the is_admin with bb_is_admin.
Plugin Solution
Don't wanna work around files and functions?
There's a great plugin that does the work for you: Use Google Libraries.
Gautam
You can use
function in bbPress. π
quicoto
Great!
Thank you Gautam π
Todd M
Thank you! π