Many public pages in WordPress can be posts (e.g. the articles from the blog), pages (e.g. contact, about, terms), or custom post type pages such as the WooCommerce product pages which belong to the “product” post type.

Sometimes, there are plugins that are loaded in these kind of pages, but they are not needed and vice-versa: you only need a plugin to load on a specific post type (e.g. WooCommerce “product” page), but you do not need it on all other pages, thus it could be unloaded via “Plugins Manager” and loaded as an exception on all pages belonging to that post type (e.g. “product” that we just mentioned).

In specific cases, a plugin will load site-wide, but only load its CSS/JS on the required post type. However, its PHP code might add up to the total loading time of the page. Even if you save, for instance, ~25 milliseconds per plugin unloaded on a page, it adds up and reduces the TTFB (time to the first byte).

How to reach the area where you could apply the rule to unload or load as an exception (from an existing unload rule) the desired plugin on a specific post type page?

  1. Within the “Asset CleanUp Pro” menu go to: “Plugins Manager” — “IN FRONTEND VIEW (your visitors)” (default tab)
  2. Scroll until you locate the plugin that you want to unload on the targeted post type page
  3. If you want to unload the plugin on a specific post type, but loaded on the rest of the pages: Within the “Unload this plugin in the front-end:” area, click on “On pages of these post types:” and it will show you the list of all the post types that are loaded on your website. Choose the one(s) that you want.
  4. If you want to unload the plugin on all pages, but you know for sure it’s only needed on a specific post type: Within the “Unload this plugin in the front-end:” area, click on “On all pages” and after you’ve done that, it will show the “Make an exception from any unload rule & always load it in the front-end:” area. Click on “On pages of these post types:” and choose the one(s) that you want (check the print screen below).
In general, plugins that loading site-wide and do not have to be loaded on specific post type pages, could be unloaded in order to save resources (fewer PHP code to trigger) and also prevent their CSS/JS assets to uselessly load on those post type pages.

Was this post helpful?