Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
downgrade jQuery on wordpress
<?php
// Downgrade to jQuery given version
function downgrade_jquery() {
global $wp_scripts;
// We want to use version 1.8.3 of jQuery, but it may break something in the admin so we only load it on the actual site.
if ( !is_admin() ) :
wp_deregister_script('jquery');
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.2');
endif;
}
add_action( 'wp_head', downgrade_jquery() );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.