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

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.