Skip to content

Instantly share code, notes, and snippets.

@dmitry-korolev
Created September 22, 2015 17:21
Show Gist options
  • Save dmitry-korolev/5a254fd894aab95a5220 to your computer and use it in GitHub Desktop.
Save dmitry-korolev/5a254fd894aab95a5220 to your computer and use it in GitHub Desktop.
Remove jQuery from the front.
<?php
/**
* Completely removes jQuery from the front.
*/
function remove_jquery() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_deregister_script('jquery-migrate');
wp_register_script('jquery', '', false, '1.11.3', true);
wp_enqueue_script('jquery');
}
}
add_action('init', 'remove_jquery');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment