Skip to content

Instantly share code, notes, and snippets.

@chuckreynolds
Created August 25, 2013 00:14
Show Gist options
  • Save chuckreynolds/6331126 to your computer and use it in GitHub Desktop.
Save chuckreynolds/6331126 to your computer and use it in GitHub Desktop.
Properly load jQuery from Google CDN - change version accordingly
function jquery_cdn() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.3');
wp_enqueue_script('jquery');
}
}
add_action('init', 'jquery_cdn');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment