Skip to content

Instantly share code, notes, and snippets.

@brycejacobson
Last active December 26, 2015 08:29
Show Gist options
  • Save brycejacobson/7122437 to your computer and use it in GitHub Desktop.
Save brycejacobson/7122437 to your computer and use it in GitHub Desktop.
WordPress change the Login Logo
<?php
// Change the default WordPress login logo
function my_login_logo() { ?>
<style type="text/css">
body.login div#login h1 a {
background-image: url(<?php echo get_bloginfo( 'template_directory' ); ?>/images/site-login-logo.png);
padding-bottom: 30px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );
// Customize the logo url and title
function my_login_logo_url() {
return get_bloginfo( '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