Horje

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' );
    }
}



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


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

Type:
Php
Category:
Web Tutorial
Sub Category:
Wordpress CDN Shortcode
Uploaded by:
Admin



Share on: