WP | Removing the default jQuery and Migrate from the header

add_filter( 'wp_default_scripts', 'remove_jquery_migrate' ); function remove_jquery_migrate( &$scripts) { if(!is_admin()) { $scripts->remove( 'jquery'); $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.11.1' ); } } function jquery_cdn() { if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', '', false, '1.8.3'); wp_enqueue_script('jquery'); } } add_action('init', 'jquery_cdn');

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.