Admin login screen custom logo and background

// Add Admin login screen custom logo and background

function custom_loginlogo() {
  echo '<style type="text/css">
        h1 a {
            background-image: url(' . get_stylesheet_directory_uri() . '/images/logo.png) !important;
            height: 108px !important;
            width: 250px !important;
            background-size: 200px !important;
        }
        body.login {
             background-image: url(' . get_stylesheet_directory_uri() . '/images/login-bg.jpg) !important;
             background-repeat:no-repeat;
             background-attachment: cover;
             background-position:center;
             position:relative;
        }
        body.login::before {
            content: " ";
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.1) none repeat scroll 0px 0px;
            position: absolute;
            z-index: -1;
        }
    </style>';
}

add_action( 'login_head', 'custom_loginlogo' );
Scroll to Top