DEV Community

Cover image for How to change the WordPress admin favicon (without an `add_action` hack)
Lucas Fenwick
Lucas Fenwick

Posted on

How to change the WordPress admin favicon (without an `add_action` hack)

Open any WordPress admin in a browser tab and you see the same thing: the generic WordPress "W" favicon. The front end can be fully branded — custom theme, custom logo, custom everything — and the back end still announces "this is WordPress" in every pinned tab.

The default way to fix it is a snippet:

add_action('admin_head', 'my_admin_favicon');
add_action('login_head', 'my_admin_favicon');
function my_admin_favicon() {
    echo '<link rel="icon" href="' . get_stylesheet_directory_uri() . '/favicon.ico" />';
}
Enter fullscreen mode Exit fullscreen mode

That works on one site. Across a dozen client sites it becomes another snippet to maintain in a child theme, and it disappears the moment someone switches themes.

I tested doing it from the admin instead, with WP Adminify's white-label / customize module. Here's the honest before/after.

What the default admin favicon costs you:

  • Every client admin tab shows the WordPress logo, not the client's brand
  • Looks unfinished on sites you white-label and resell
  • The snippet fix lives in the theme, so a theme switch wipes it

What changed after setting the favicon in Adminify:

  • Upload one image, the admin AND login screen tab icon both update
  • It's stored in plugin settings, so it survives theme changes
  • Same brand favicon pushed to every client site from one place
  • No code, no FTP, no editing functions.php

Small thing, but the first time a client pinned their admin tab and saw their icon instead of the WordPress "W", it landed.

Short demo (before vs after favicon):

Step-by-step doc: https://wpadminify.com/docs/adminify/customize/change-favicon

How do you handle admin branding — snippet in a child theme, MU-plugin, or a dedicated tool? Curious what survives theme switches best.

Top comments (0)