Add Favicon to Your WordPress Admin and Login

WordPressPosted on

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');

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

Similar Posts

More content in WordPress category