How to Remove WordPress Dashicons (dashicons.min.css)?

Dashicons is the official WordPress icon since WordPress 3.8. The dashicons.min.css script loads in front end, which seems unnecessary to some users. It only needs on the backend for dashboard icons. 

If you are not using any Dashicons on your page or post. Then you can disable the script from loading. It can enhance a little performance. 

Get WP Adminify Now

Increase your sites's efficiency by powering up your WordPress Admin Dashboard

The dashicons stylesheet looks like the following line. 

				
					<link rel='stylesheet' id='dashicons-css'  href='.../wp-includes/css/dashicons.min.css?ver=5.7.2' type='text/css' media='all' />
				
			

Let me introduce you to a little snippet that needs to place inside your function.php file. If you properly copy and paste the following code in function.php, then your dashicons stylesheet will be removed from front end. 

				
					/** Remove Dashicons from Admin Bar for non logged in users **/
add_action('wp_print_styles', 'jltwp_adminify_remove_dashicons', 100);

/** Remove Dashicons from Admin Bar for non logged in users **/
function jltwp_adminify_remove_dashicons()
{
    if (!is_admin_bar_showing() && !is_customize_preview()) {
        wp_dequeue_style('dashicons');
        wp_deregister_style('dashicons');
    }
}
				
			

Remove Dashicons in One Click

If coding seems complicated to you, then I have a solution that will help you to remove dashicons from your dashboard. 

Install WP Adminify plugin first. Now click on WP Adminify option, navigate to tweaks > Head. Search for Remove Dashicons option and enable it.

Remove Dashicons from Admin Bar

With this single click you able to remove the default Dashicons stylesheet from your WordPress Website. 

Was this article helpful?

© 2022 - Adminify | All rights reserved

WP Adminfy accepted payment methods