Skip to content

Instantly share code, notes, and snippets.

@dipakcg
Created August 14, 2019 06:17
Show Gist options
  • Save dipakcg/19ae459326f8e978dc997ae6ee45d510 to your computer and use it in GitHub Desktop.
Save dipakcg/19ae459326f8e978dc997ae6ee45d510 to your computer and use it in GitHub Desktop.
WordPress: Load custom jQuery version
if ( !is_admin() ) {
// Deregister the jquery version bundled with WordPress.
wp_deregister_script( 'jquery' );
// CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header.
wp_register_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js', false, '3.4.1' );
wp_enqueue_script( 'jquery' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment