// functions.php wp_deregister_script( 'jquery' ); // On annule l'inscription du jQuery de WP wp_enqueue_script( // On déclare une version plus moderne 'jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js', false, '3.5.1', true ); } add_action( 'wp_enqueue_scripts', 'sp_register_assets' );
// functions.php function dequeue_jquery_migrate( &$scripts ){ if( !is_admin() ) { $scripts->remove( 'jquery'); $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' ); } } add_filter( 'wp_default_scripts', 'dequeue_jquery_migrate' );
Read : Reasons to dequeue this script