Custom WordPress Login Screen

Default Login Screen

The default WordPress login form looks like this:

and it contains some things you may not want.

  • The WordPress logo which is linked to wordpress.org,
  • Lost your password?
  • Back to homepage.

Customize the Login Form

Add code to the theme functions.php file to customize the Login form.

// Change login page image
add_action("login_head", "my_login_head");
function my_login_head() {
	echo "
	<style>
		body {
		background-color:#ffffff;
		}
		body.login #login h1 a {
		background: url('http://PATH TO YOUR IMAGE') no-repeat scroll center top transparent;
		background-size: 318px auto;
		width: 318px;
		height: 50px;
		text-indent: 0px;
		color: #000000;
		}
		#loginform {
		background-color:#f1f1f1;
		border:solid 1px #c0c0c0;
		border-radius:4px;
		}
		#loginform label {
		color: #000000;
		}
		#wp-submit {
		border:0px;
		}
		#nav {
		display:none;
		}
		#backtoblog {
		display:none;
		}
		.forgetmenot {
		display: none;
		}
		.pw-weak {
		display: none !important;
		}
	</style>
	";
}

// Change title for login screen
add_filter('login_headertitle', create_function(false,"return 'YOUR DOMAIN NAME HERE';"));

// Change url for login screen logo
add_filter('login_headerurl', create_function(false,"return home_url();"));