Remove jQuery from Theme

Removes jQuery from your frontend theme if no administrator is logged-in. jQuery will still be…

Author:Marc Tönsing (profile at wordpress.org)
WordPress version required:5.0
WordPress version tested:5.6.4
Plugin version:1.0
Added to WordPress repository:09-03-2021
Last updated:09-03-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:1
Plugin URI:https://github.com/mtoensing/remove-jquery
Total downloads:1 723
Active installs:200+
plugin download
Click to start download

Removes jQuery from your frontend theme if no administrator is logged-in. jQuery will continue to work in you backend and when the admin toolbar is visible. Plugins which depend on jQuery will not be loaded either.

This plugin does nothing more but this:

function init_without_jquery() {
    if (!is_admin() AND !is_admin_bar_showing()) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', false);
    }
}

add_action('init', 'init_without_jquery');

FAQ
ChangeLog