Home » Development » Remove WordPress CSS / JS / Fonts website clutter
WordPress is fun, but many of my clients take the plugin fun to new levels :)
The problem is that many plugins do not load external files on demand. Same applies for WebFonts that have been added to the system.
Its no fun hunting down all those resources and slim down pages manually, but sometimes there is no way around it.
The big problem is finding the names of the enqueued files, their handles. They are often hidden deep in the plugins. But if they are registered somewhere, you should be able to find them somewhere :)
Add this to your functions.php and you will get a nice overview of all the styles and their handles registered. You can do the same for the registered scripts.
This will get you an overview of all the registered files. Now its only a matter of doing the unregister operation with some simple WordPress conditional logic.
Yes there is and it is called “Asset Queue Manager” …
“This tool allows you to monitor, dequeue and requeue scripts and styles that are enqueued on your site. It is designed for frontend performance engineers who want to view and manage all assets enqueued on any page and control the minification and concatenation themselves.”
Get in touch
I am a full-stack developer. My expertise include:
I love programming, design and know my way around server architecture as well. I would never feel complete, with one of these missing.
I have a broad range of interests, that’s why I constantly dive into new technologies and expand my knowledge where ever required. Technologies are evolving fast and I enjoy using the latest.
Apart from that, I am a peace loving guy who tries to have people around him that think the same. I truly believe in the principle: “If you help someone, someone will help you, when you need it."