Categories
CSS Themes WordPress

Custom WordPress Admin Login Logo

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.

By Dylan Hildenbrand

10+ years experience in web development, homelab enthusiast, tinkerer

profile for Dylan Hildenbrand on Stack Exchange, a network of free, community-driven Q&A sites  

Do you like these posts? Consider sponsoring me or making a donation!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.