Skip to content

Instantly share code, notes, and snippets.

@runezero
Created May 25, 2022 14:17
Show Gist options
  • Select an option

  • Save runezero/1eebfca163334a83f6fcd734e0ddd55c to your computer and use it in GitHub Desktop.

Select an option

Save runezero/1eebfca163334a83f6fcd734e0ddd55c to your computer and use it in GitHub Desktop.
[Change wp login page styling] Add a custom styling to the login page #wordpress
function wpdev_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.jpg);
height:85px;
width:150px;
background-size: 150px 85px;
background-repeat: no-repeat;
padding-bottom: 0px;
}
body {
background-color: #ffffff!important;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'wpdev_login_logo' );
add_filter( 'login_headerurl', 'wpdev_loginlogo_url' );
function wpdev_loginlogo_url($url) {
return get_site_url();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment