Plogins Assets - Conditional Script & Style Loading
Conditional script & style loading for WordPress - dequeue assets per page for a lighter, faster front end.
by WPPoland.com · github.com/wppoland/plogins-assets · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/wppoland/plogins-assets/archive/refs/heads/main.zipReadme
=== Plogins Assets - Conditional Script & Style Loading === Contributors: wppoland Tags: performance, assets, scripts, styles, optimization Requires at least: 6.5 Tested up to: 7.1 Requires PHP: 8.1 Stable tag: 1.0.4 License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html
Dequeue individual scripts and styles on the pages that do not need them. Fewer requests, lighter pages, faster loads - using WordPress core.
== Description ==
Most plugins load their CSS and JavaScript on every page, even where their feature never appears. A contact form script on your checkout, a slider stylesheet on your blog posts, a social-share bundle on your privacy policy. That weight slows every visit.
Plogins Assets lets you remove a specific script or style from exactly the pages where it is not needed - front page, blog index, single posts and pages (by ID), or by device. It uses the standard WordPress enqueue system (wp_dequeue_script / wp_dequeue_style), so there is no page-builder lock-in and nothing proprietary to learn.
= What it does =
- Remove any registered script or style handle by name.
- Choose where it is removed: everywhere, the front page, the blog posts index, single posts/pages (by ID), or only mobile / only desktop.
- Autocomplete hints from the handles registered on your site.
- Runs late on the front end so it removes handles reliably, and never touches the admin.
= What it does not do =
It does not minify, combine or defer. It removes what you tell it to remove - nothing automatic, nothing hidden. Removing a handle that another script depends on can break functionality, so change one rule at a time and check the front end.
= Part of the Plogins family =
Plogins Assets is one of a family of small, focused WordPress and WooCommerce plugins by WPPoland. Learn more at plogins.com.
== Installation ==
- Upload the plugin to
/wp-content/plugins/plogins-assets, or install it from the Plugins screen. - Activate it.
- Go to Plogins Assets in the main admin menu.
- Add a rule: type the handle, pick script or style, and choose where to remove it.
- Save, then check the front end.
== Frequently Asked Questions ==
= How do I find a handle name? =
Open the page in your browser, view source or the Network tab, and look at the id attribute of the `