Skip to content

Instantly share code, notes, and snippets.

@sarvar
Created February 22, 2017 13:17
Show Gist options
  • Save sarvar/9c4145ac4a6bb5c7d8cc1fb2a36527f6 to your computer and use it in GitHub Desktop.
Save sarvar/9c4145ac4a6bb5c7d8cc1fb2a36527f6 to your computer and use it in GitHub Desktop.
Customizing the Login Form on Wordpress
function my_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png);
padding-bottom: 30px;
}
</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 'Your Site Name and Info';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment