Problem/Use Case:
The login page shows the WordPress logo by default. You can replace it with your brand’s logo.
Snippet:
// Customize login logo
function custom_login_logo_style() {
echo '
<style>
.login h1 a {
background-image: url(' . get_stylesheet_directory_uri() . '/images/custom-logo.png);
background-size: contain;
width: 200px;
height: 100px;
}
</style>';
}
add_action('login_head', 'custom_login_logo_style');Explanation:
This changes the login logo to your own image located in your theme’s images folder.
Where to Place It:
In functions.php.
Bonus Tip:
Adjust the width and height to fit your logo dimensions.