How to remove dashicons.min.css call from the frontend

How to only deregister WordPress stylesheet for non-logged in users?

 

On the backend(wp-admin), icons are powered by dashicons.min.css, WordPress default icons set. The file is available on the frontend too. But usually, theme developers use Font Awesome or other theme provider and not dashicons.min.css. The file is 28kB gzipped so you could gain a small performance boost by removing it. Here is the code snippet to remove dashicons.min.css on the frontend:

Note: Please check your frontend and your CSS files before removing the dashicons.min.css to be sure there are no elements using it.

Leave a Reply

Your email address will not be published. Required fields are marked *