When you deregister jQuery
, you have to register it again. Try this code
UPDATE: You have to deregister jQuery
first (first part of your code), so the final code should be:
//Load on Footer
add_action('wp_enqueue_scripts', 'register_jquery');
function register_jquery() {
wp_deregister_script('jquery'); // remove original jQuery
wp_register_script( // add custom jQuery in footer
'jquery',
'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js',
array(), // dependencies
null, // version
true); // load in footer?
wp_enqueue_script('jquery');
}
But it’s NOT RECOMMENDED to load custom jquery in wordpress.