How to customize the WordPress admin login screen

Facebook
Twitter
LinkedIn

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);
} );
Matt Pramschufer is a seasoned technology expert and co-founder of E-Moxie, where he specializes in transforming visionary ideas and business goals into thriving online ventures. With over two decades of experience in website design, development, and custom application creation, Matt understands that success requires more than just a visually appealing website or a well-built app. He combines proven methodologies with the latest internet technologies to deliver digital solutions that not only look great but also drive measurable growth.

Related Posts