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
    LightFace:  Facebook Lightbox for MooTools

    One of the web components I've always loved has been Facebook's modal dialog.  This "lightbox" isn't like others:  no dark overlay, no obnoxious animating to size, and it doesn't try to do "too much."  With Facebook's dialog in mind, I've created LightFace:  a Facebook lightbox...

  • By
    CSS vs. JS Animation: Which is Faster?

    How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native apps? This article serves as a point-by-point...

Incredible Demos

  • By
    Camera and Video Control with HTML5

    Client-side APIs on mobile and desktop devices are quickly providing the same APIs.  Of course our mobile devices got access to some of these APIs first, but those APIs are slowly making their way to the desktop.  One of those APIs is the getUserMedia API...

  • By
    MooTools 1.2 Tooltips: Customize Your Tips

    I've never met a person that is "ehhhh" about XHTML/javascript tooltips; people seem to love them or hate them. I'm on the love side of things. Tooltips give you a bit more information about something than just the element itself (usually...

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!