Code

WP Enqueue Manager

WP Enqueue Manager

This is simple and very helpful plugin you can use to wp enqueue scripts and stylesheets on the page or globally through out the site. It is very useful when you want to include any custom JavaScript or Stylesheet on some specific page or globally across the site without touching the code of theme.

The global scripts and styles can be overridden on the specific pages as well. For that you will specify the same handle name.

It also manages defer, and async for JavaScript file, which eliminates the issue of render blocking javascript.

Also, you can use async option for css to eliminate the issue of render blocking css. This should be used with caution though, since it may result into FOUC (flash of unstyled content).

Installation:

  • Place the unzipped plugin folder into the wp-content/plugins/ folder.
  • Activate the plugin from wp-admin -> plugins section.
  • You will see the WP Enqueue Manager in each page and posts. Also, there is global setting available under WP Enqueue Manager section in the sidebar of admin panel.

Note that the page must have used wp_footer() function which normally is the case in most themes.

by
by
by
by
by
by