functions.php
// Custom login page
function my_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(/images/logo.png);
padding-bottom: 45px;
background-size: 285px;
height: 100%;
width: 100%;
}
body.login {
background: #2196f3; /* fallback for old browsers */
background: -webkit-linear-gradient(to left, #2196f3 , #f44336); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to left, #2196f3 , #f44336); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
#login .button.button-large {
height: 40px;
padding: 0 12px 3px;
background: #1369a9;
width: 100%;
margin-top: 20px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.login form {
border-top: 5px solid #d81d28;
}
.login #backtoblog {
display: none;
}
.login form .forgetmenot {
background: #f2f2f2;
width: 100%;
padding: 10px 40px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
text-align: center;
}
.login #nav {
margin: 40px 0 0;
font-size: 24px;
font-weight: 300;
text-align: center;
}
.login #nav a {
color: #ececed !important;
font-size: 24px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );
function my_login_logo_url() {
return home_url();
}
add_filter( 'login_headerurl', 'my_login_logo_url' );
function my_login_logo_url_title() {
return 'My Custom Login Page';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );