Skip to content

Instantly share code, notes, and snippets.

@Alexisgt01
Last active August 30, 2019 11:04
Show Gist options
  • Save Alexisgt01/cd763a58832849c77599dbe3c3ca47e6 to your computer and use it in GitHub Desktop.
Save Alexisgt01/cd763a58832849c77599dbe3c3ca47e6 to your computer and use it in GitHub Desktop.
Wordpress custom login page : change color & logo
function new_login_page() {
?>
<style type="text/css">
body.login div#login h1 a {
background-image: "your image";
background-size: 100%;
width: 220px;
padding-bottom: 30px;
}
.login #login_error, .login .message, .login .success {
border-left: 4px solid #cc1410 !important
}
#login #wp-submit {
background: #cc1410 !important;
border-color: #cc1410 !important;
box-shadow: none;
text-shadow: none;
}
#login input[type=checkbox]:focus, input[type=color]:focus, input[type=date]:focus, input[type=datetime-local]:focus, input[type=datetime]:focus, input[type=email]:focus, input[type=month]:focus, input[type=number]:focus, input[type=password]:focus, input[type=radio]:focus, input[type=search]:focus, input[type=tel]:focus, input[type=text]:focus, input[type=time]:focus, input[type=url]:focus, input[type=week]:focus, select:focus, textarea:focus {
border-color: #cc1410 !important; box-shadow: 0 0 2px #cc1410 !important;
}
</style>
<?php
}
add_action( 'login_enqueue_scripts', 'new_login_page' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment