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' );
}
}
Load jQuery from the Google CDN for Wordpress Theme Fucntions | Wordpress CDN Shortcode |
How to Load jQuery from the Google CDN | Wordpress CDN Shortcode |
Type: | Php |
Category: | Web Tutorial |
Sub Category: | Wordpress CDN Shortcode |
Uploaded by: | Admin |