WordPress Disable Dashicons For Non-Logged Users Without Plugin

WordPress disable Dashicons is a smart speed tweak. If your visitors aren’t logged in, there’s no need to load the admin icon font. Here’s how to disable Dashicons for non-logged users without a plugin.

Add this to your child theme’s functions.php file:


function qdt_disable_dashicons() {
  if ( ! is_user_logged_in() ) {
    wp_deregister_style( ‘dashicons’ );
  }
}
add_action( ‘wp_enqueue_scripts’, ‘qdt_disable_dashicons’ );

How It Works

This WordPress disable Dashicons snippet checks if the visitor is not logged in. If true, it deregisters the Dashicons style, saving one HTTP request and a few KBs.

Why WordPress Disable Dashicons?

Dashicons are WordPress admin icons. On the frontend, non-logged visitors don’t need them. Disabling them speeds up your site, especially for clean static pages.

Common Mistake

Some plugins may need Dashicons on the frontend (like social share buttons). Test your site after adding this tweak to make sure no icons break.

Pro Tip

Combine this with other style/script deregisters for maximum frontend performance.

Related Snippet

👉 Custom Excerpt Length Without Plugin

Leave a Comment