X

How To Change the Default Login Logo

Snippets by IsItWP

Are you looking for a way to change the default login logo? This snippet allows you to change the logo you see when you login to WordPress.

Instructions:

  1. Add this code to your theme’s functions.php file or in a site-specific plugin.
    function custom_login_logo() {
        echo '<style type="text/css">
            h1 a { background-image:url('.get_bloginfo('template_directory').'/images/login_logo.png) !important; }
        </style>';
    }
    add_action('login_head', 'custom_login_logo');
    
  2. Name your login image login_logo.png.
  3. Then add your login image to a folder called images in your theme folder.

Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.

If you liked this code snippet, please consider checking out our other articles on the site like: 6 Best WordPress Security Plugins Compared.

Comments   Leave a Reply

  1. Thanks.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!