I need to make WordPress not include jQuery in the <head>
section of every page.
The reason I need this – is because I am already including jQuery at the very bottom of the document.
I tried this: wp_deregister_script('jquery')
but it doesn’t work.
How does one remove jQuery from the <head>
section?
3 Answers
the following may work
function wpdocs_dequeue_script() {
wp_dequeue_script( 'jquery' );
}
add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 );