The default WordPress admin login screen, while functional, is quite generic and often immediately recognizable as a WordPress site. For those who prefer a more personalized or branded experience—or simply want to keep the platform used under wraps—it’s a good idea to customize this login screen. Customizing the look and feel of the admin login can enhance your brand’s presence and give a more polished appearance to anyone who needs to log in.
The snippet below provides a simple way to replace the default WordPress logo with your own and adjust the link button colors to match your brand’s color scheme. With just a few lines of code, you can create a login experience that aligns with the overall aesthetic of your site, making it feel more integrated and professional. This not only enhances the user experience but also adds a layer of customization that reflects your attention to detail.
<?php
add_action( 'login_enqueue_scripts', function(){
?>
<style type="text/css">
body {
background-color:#fff!important;
}
#login h1 a, .login h1 a {
background-image: url('https://emoxie.com/wp-content/uploads/2023/06/emoxie-logo.svg');
width:100%;
background-size: contain;
background-repeat: no-repeat;
margin-top:40px;
}
.login .button-primary {
background: #84A930!important;
border-color: #84A930!important;
color: #fff;
}
</style>
<?php
} );
add_filter( 'login_headerurl', function(){
return home_url();
});
add_filter( 'login_headertitle', function(){
return get_option('site_title',true);
} );