WP JS WordPress Plugin
This plugin will GZIP and JSMIN your JavaScript files as well as allowing the ability to put JavaScript files into a single file at the client's end. Cache expiry time can also be set in the admin page.
NEW: * SECURITY PATCH - please update the plugin. (Thanks to Dario Caregnato) * Will now work with Child Themes (Thanks to Wupperpirat)
Now in version 2.0 you can add JavaScript files to a specific page or post and putting all of them into one file.
Version 2.0
- Ability to add JavaScript files to specific page/post
- Improved security
- Reduced URL outputted
Example
<script src="<?php wp_js('path/to/js/file.js'); ?>" type="text/javascript"></script>
OR you can also concatenate the JavaScript files (comma separated)
<script src="<?php wp_js('path/toSites running WP JS, click to open one
Plugins with a similar footprint
Ranked by how many sites run them — a quick way to compare alternatives.
Usage of WP JS over time
June 2023 — July 2024Between June 2023 and July 2024 the number of sites running this plugin went from 3 to 1 — down 2 (-66.7%).
| Month | Sites | Change |
|---|---|---|
| July 2024 | 1 | +0 |
| June 2024 | 1 | -2 |
| May 2024 | 3 | +0 |
| April 2024 | 3 | +0 |
| March 2024 | 3 | +0 |
| February 2024 | 3 | +0 |
| January 2024 | 3 | +0 |
| December 2023 | 3 | +0 |
| November 2023 | 3 | +0 |
| October 2023 | 3 | +0 |
| September 2023 | 3 | +0 |
| August 2023 | 3 | +0 |
| July 2023 | 3 | +0 |
| June 2023 | 3 | — |
Sites running WP JS
All sites in the collection1 examples from the collection. Open any site to see the theme and plugins we found on it.