Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created May 10, 2017 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/24a562a2818df97665c13ba15d25855c to your computer and use it in GitHub Desktop.
Save billerickson/24a562a2818df97665c13ba15d25855c to your computer and use it in GitHub Desktop.
<?php
/**
* Login Logo URL
*
*/
function ea_login_header_url( $url ) {
return esc_url( home_url() );
}
add_filter( 'login_headerurl', 'ea_login_header_url' );
add_filter( 'login_headertitle', '__return_empty_string' );
/**
* Login Logo
*
*/
function ea_login_logo() {
$dir = get_stylesheet_directory_uri() . '/assets/images';
?>
<style type="text/css">
.login h1 a {
background-image: url(<?php echo $dir;?>/logo@2x.png);
background-image: url(<?php echo $dir;?>/logo.svg), none;
background-size: contain;
background-repeat: no-repeat;
display: block;
overflow: hidden;
text-indent: -9999em;
width: 312px;
height: 66px;
}
</style>
<?php
}
add_action( 'login_head', 'ea_login_logo' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment