Horje
How to Load jQuery from the Google CDN

Load jQuery from the Google CDN for Wordpress Theme Fucntions

Just copy and past following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
// Even more smart jQuery inclusion :)
add_action( 'init', 'jquery_register' );

// Register from Google and for footer
function jquery_register() {

    if ( !is_admin() ) {

        wp_deregister_script( 'jquery' );
        wp_register_script( 'jquery', ( 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' ), false, null, true );
        wp_enqueue_script( 'jquery' );
    }
}





Related Articles
How to Load jQuery from the Google CDN Wordpress CDN Shortcode

Single Articles
Load jQuery from the Google CDN for Wordpress Theme FucntionsWordpress CDN Shortcode

Read Full:
Wordpress CDN Shortcode
Category:
Web Tutorial
Sub Category:
Wordpress CDN Shortcode
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
50
Tested on:
WordPress 3.0.1



Share on: