Skip to content

Instantly share code, notes, and snippets.

@jbrz0
Created June 22, 2016 17:36
Show Gist options
  • Save jbrz0/bb6d03fdbdc20c5ede0d7c74d59a123e to your computer and use it in GitHub Desktop.
Save jbrz0/bb6d03fdbdc20c5ede0d7c74d59a123e to your computer and use it in GitHub Desktop.
Script for overriding the default jquery injected in a theme by wordpress
//Replace the default WordPress jQuery script with a different one
function modify_jquery() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');
wp_enqueue_script('jquery');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment