Skip to content

Instantly share code, notes, and snippets.

@pasadamedia
Last active July 4, 2016 18:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pasadamedia/91f1d5f6b47b49b2400d669ae76b3d6a to your computer and use it in GitHub Desktop.
Save pasadamedia/91f1d5f6b47b49b2400d669ae76b3d6a to your computer and use it in GitHub Desktop.
Customize the WordPress login page (see https://premium.wpmudev.org/blog/customize-login-page/)
//* Customize the login page (see https://premium.wpmudev.org/blog/customize-login-page/)
add_action('login_head', 'pasada_custom_login');
function pasada_custom_login() {
echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('stylesheet_directory') . '/login.css" />';
}
add_filter( 'login_headerurl', 'pasada_login_logo_url' );
function pasada_login_logo_url() {
return get_bloginfo( 'url' );
}
add_filter( 'login_headertitle', 'pasada_login_logo_url_title' );
function pasada_login_logo_url_title() {
return get_bloginfo( 'title' );
}
/* Style the WordPress login page (see https://premium.wpmudev.org/blog/customize-login-page/) */
/* Add custom login logo to theme's "images" directory. */
.login h1 a {
background-image: url('images/login-logo.png');
height: 80px;
width: auto;
background-size: auto 80px; /* Logo height should be 80px */
}
.login .button-primary {
background: #e31b23;
border: none;
box-shadow: none;
text-shadow: none;
}
.login .button-primary:hover {
background: #000;
}
.login .button-primary:active {
background: #e31b23;
box-shadow: none;
transform: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment