Add Favicon to Your WordPress Admin and Login

Posted on Updated on by Adam Laki

By default, your theme favicon is restricted to your theme, so it isn’t present at your admin and login screen.

Fortunately, you can quickly add it with login_head and admin_head action:

function add_favicon() {
    $favicon_url = get_stylesheet_directory_uri() . '/assets/images/favicon/favicon-16x16.png';
    echo '<link rel="shortcut icon" href="' . $favicon_url . '" />';

add_action('login_head', 'add_favicon');
add_action('admin_head', 'add_favicon');

Looking for web dev job?
You can check them on Jooble.

Need a web developer? Maybe we can help, get in touch!