web dev & more!

Custom WordPress Admin Login Logo

Published: September 10, 2014

If you want to replace the WordPress logo on your admin login page with your own custom image, you can do it with just a couple simple lines in your functions.php file.

add_action("login_head", "my_login_head");
function my_login_head() {
    echo "<style>
        body.login #login h1 a {
        background: url('".get_bloginfo('template_url')."/images/logo_login.png') no-repeat scroll center top transparent;
        height: 181px;
        width: 269px;
        padding:0 25px;
    }
    </style>";
}

Simply upload your file to the proper path and adjust the CSS accordingly.