wp_deregister_script(‘jquery’) not working

I use this code:

if ( ! function_exists( ‘WPScripts_enqueue’ ) ) {
function WPScripts_enqueue() {

// Removing default jQuery
wp_deregister_script( ‘jquery’ );

// Enqueue the new jQuery
wp_enqueue_script(‘jquery’, ‘https://code.jquery.com/jquery-3.2.1.slim.min.js’, false, ‘3.2.1’, false);

// Enqueue custom Bootstrap file
wp_enqueue_style(‘bootstrap’, get_template_directory_uri() . ‘/css/bootstrap.css’, array(), false, ‘all’);

add_action(‘wp_enqueue_scripts’, ‘WPScripts_enqueue’);

however, wp still load jquery from wp core:



Read more here:: wp_deregister_script(‘jquery’) not working

Leave a Reply

Your email address will not be published. Required fields are marked *