Skip to content

Instantly share code, notes, and snippets.

@wpjess
Created April 23, 2020 18:24
Show Gist options
  • Save wpjess/e5d29a99371dca660884ab5c6c94ae63 to your computer and use it in GitHub Desktop.
Save wpjess/e5d29a99371dca660884ab5c6c94ae63 to your computer and use it in GitHub Desktop.
WP custom login logo
////////////////////////////////////////////////////////////////////
// LOGIN LOGO
////////////////////////////////////////////////////////////////////
function my_login_logo() { ?>
<style type="text/css">
.login h1 {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png);
padding-bottom: 30px;
background-repeat: no-repeat;
background-position: top center;
width:260px;
height:81px;
margin: 0 auto;
}
.login h1 a { background:transparent; }
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment