Created
August 14, 2019 06:17
-
-
Save dipakcg/19ae459326f8e978dc997ae6ee45d510 to your computer and use it in GitHub Desktop.
WordPress: Load custom jQuery version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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