Remove jQuery from Theme Icon

Remove jQuery from Theme

By Marc Tönsing

Active Installs

100+

Last Updated

March 9, 2021

First Released

March 9, 2021

Download History (Last one month)


Contributors

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');

Remove jQuery can be found and installed via the Plugin menu within WordPress administration (Plugins -> Add New). Alternatively, it can be downloaded from WordPress.org and installed manually…

Why did you do this?

Because I needed a simple plugin to do this job and decided to do it on his own. WordPress frontends are is much faster without jQuery.

jQuery is still loading! The plugin does not work!

You are most likely logged-in as administrator and the admin topbar is visible. Many plugins rely on jQuery for backend features. So I kept it enabled for the admin topbar, too.

Changelog

1.0

  • Initial version.
<br />
<b>Warning</b>:  Undefined array key /home/ylinkin/truewp.net/wp-content/plugins/truewp-plugin-info/truewp-plugin-info.php on line 756
" width="120" height="120">

Available Versions

Version Download Type
1.0 Download Stable

Plugin Info

  • Version: 1.0
  • Last Updated: March 9, 2021
  • Active Installs: 100+
  • WordPress Version: 5.0 or higher
  • Tested up to: 5.6.19
  • PHP Version: or higher
  • Tags:    
    jquery

Ratings


5.0 out of 5 stars. (1 reviews)

See all reviews
Scroll to Top