WordPress Tutorials 1 min read

How to Disable Dashicons in WordPress

Published by Manuel Campos on September 24, 2022 • Updated on November 4, 2024

In WordPress, Dashicons are a set of icons used within the WordPress admin dashboard.

By default, they’re loaded on both the frontend and backend, even though they’re only typically visible to logged-in users

If your site doesn’t rely on these icons on the frontend, you can improve your site’s loading speed by disabling Dashicons for visitors who aren’t logged in as admins.

Here’s a quick guide on how to do it.

To disable the dashicons in WordPress, you can add the following code to your theme’s functions.php file:

add_action( 'wp_enqueue_scripts', 'dequeue_dashicon' );
function dequeue_dashicon() {
    if ( current_user_can( 'update_core' ) ) {
        return;
    }
    wp_deregister_style( 'dashicons' );
}
Manuel Campos

Manuel Campos

I'm a WordPress enthusiast. I document my journey and provide actionable insights to help you navigate the ever-evolving world of WordPress."

Read Next

Support Honest Reviews

Help keep the reviews coming by using my recommended links.

May earn commission • No extra cost to you