How to Change the WordPress Admin Login Logo

By  on  

There are numerous content management systems that thrive these days but none are as prolific as WordPress. Every client wants the ability to change their website at a moment's notice and they want to do it themselves, and again, WordPress is the best fit for that. You fit the client with WordPress, customize it with plugins for the features they need, and give them the login URL...where they would see a WordPress logo...which cheapens the work you've done. Going the extra mile to customize the admin interface for your client will make a world of difference, the most prominent of changes is showing the client's logo at the admin login screen.

The logo displayed at the admin login screen is an image but it's displayed via CSS background-image. To change that image, you'll need to change a CSS selector within admin, and the safest way to do that is with a custom WordPress admin stylesheet:

// Update CSS within in Admin
function admin_style() {
  wp_enqueue_style('admin-styles', get_template_directory_uri().'/admin.css');
}
add_action('admin_enqueue_scripts', 'admin_style');

The selector that WordPress uses or the log is .login h1 a, so to safely change the logo, the following specificity update is a good bet:

body .login h1 a {
  background-image: url('path/to/client-logo.png');
}

The CSS snippet above will change the default WordPress logo to an image of your choosing. You may need to adjust background-size dimensions to ensure the image displays correctly.

Most clients wont have a concept of what WordPress is, nor should they need to -- they simply want a website admin panel that looks like it was made just for them...and branding is the easiest way to do that.

Recent Features

  • By
    Vibration API

    Many of the new APIs provided to us by browser vendors are more targeted toward the mobile user than the desktop user.  One of those simple APIs the Vibration API.  The Vibration API allows developers to direct the device, using JavaScript, to vibrate in...

  • By
    6 Things You Didn’t Know About Firefox OS

    Firefox OS is all over the tech news and for good reason:  Mozilla's finally given web developers the platform that they need to create apps the way they've been creating them for years -- with CSS, HTML, and JavaScript.  Firefox OS has been rapidly improving...

Incredible Demos

  • By
    Introducing MooTools LazyLoad

    Once concept I'm very fond of is lazy loading. Lazy loading defers the loading of resources (usually images) until they are needed. Why load stuff you never need if you can prevent it, right? I've created LazyLoad, a customizable MooTools plugin that...

  • By
    Create a CSS Cube

    CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a language capable of creating deep, creative visuals.  Add animation and you've got something really neat.  Unfortunately each CSS cube tutorial I've read is a bit...

Discussion

  1. Vladimir

    This is work for me:

    function admin_style() {
        wp_enqueue_style('admin-styles', get_template_directory_uri().'/css/admin.css');
    }
    add_action('login_enqueue_scripts', 'admin_style');
    
    body.login #login h1 a {
        background-image: url('../img/logo.png');
    }
    
  2. Thank you for sharing an amazing guide for changing logo.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!