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. 

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()) {

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
August 27, 2021
Head Tips and Tutorials
Was this article helpful?