A WordPress plugin to centrally manage and selectively load popular JavaScript libraries (GSAP, Swiper, Font Awesome, etc.) either site-wide or on specific pages.
- Centralized Management: Enable/disable libraries globally from a single settings page.
- Per-Page Loading: Selectively load libraries only on pages that need them.
- Popular Libraries Included:
- GSAP (with ScrollTrigger)
- Swiper.js (with CSS)
- Anime.js
- Chart.js
- Font Awesome (via your kit)
- Popper.js (v2)
- Floating UI (DOM)
- Embla Carousel (with CSS)
- Sortable.js
- A11y Dialog
- Download the plugin from GitHub
- Upload to your WordPress site's
/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Visit Settings → JS Libraries to configure
- Go to Settings → JS Libraries
- Check the boxes next to libraries you want to load on every page
- If enabling Font Awesome, paste your kit's script URL in the provided field
- Save Changes
- Edit any post or page
- Find the "JS Libraries" box in the editor sidebar
- Check the libraries you want to load on this specific page
- Update/Publish the post
First, enable GSAP either site-wide or on a specific page. Then in your theme or custom JS:
// GSAP is available as a global
gsap.to(".my-element", {
duration: 1,
x: 100
});
// ScrollTrigger is also included
ScrollTrigger.create({
trigger: ".my-trigger",
animation: tween
});If you add a new library and it's not appearing in the editor:
- Visit any admin page with
?recreate_terms=1appended to the URL - This safely creates any missing terms without affecting existing selections
To force recreation (destructive, will remove existing selections):
- Append
?recreate_terms=1&force=1to any admin URL - Back up your database first!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GPL v2 or later - see the LICENSE file for details.