Custom WordPress Admin Login Logo – closingtags </>
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

Dylan Hildenbrand smiling at the camera. I have tossled, brown hair, rounded glasses, a well-trimmed and short beard. I have light complexion and am wearing a dark sweater with a white t-shirt underneath.

Author and full stack web developer experienced with #PHP, #SvelteKit, #JS, #NodeJS, #Linux, #WordPress, and #Ansible. Check out my book at sveltekitbook.dev!

Do you like these posts? Consider sponsoring me on GitHub!

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.