Skip to content

Instantly share code, notes, and snippets.

@iamandrewpeters
Last active October 18, 2018 15:11
Show Gist options
  • Save iamandrewpeters/528144adde6d640ac376305ded4d69a4 to your computer and use it in GitHub Desktop.
Save iamandrewpeters/528144adde6d640ac376305ded4d69a4 to your computer and use it in GitHub Desktop.
Change Login Logo and URL
//Login Page Customization
//Add the Logo
function reach_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(#); //Replace the # with your image's URL
height:65px;
width:320px;
background-size: 320px 65px;
background-repeat: no-repeat;
padding-bottom: 10px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'reach_login_logo' );
//Change the login on the logo
function my_login_logo_url() {
return home_url();
}
add_filter( 'login_headerurl', 'my_login_logo_url' );
function my_login_logo_url_title() {
return '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