Skip to content

Instantly share code, notes, and snippets.

@JiveDig
Last active December 26, 2015 19:19
Show Gist options
  • Save JiveDig/7200588 to your computer and use it in GitHub Desktop.
Save JiveDig/7200588 to your computer and use it in GitHub Desktop.
Change login logo and link. logo.png goes in /child_theme/images/ directory
/**
* Change login logo
* Max image width should be 320px
* @link http://andrew.hedges.name/experiments/aspect_ratio/
*/
add_action('login_head', 'rgt_custom_dashboard_logo');
function rgt_custom_dashboard_logo() {
echo '<style type="text/css">
.login h1 a {
background-image:url('.get_stylesheet_directory_uri().'/images/logo.png) !important;
background-size: 320px 82px !important;
width: 320px !important;
height: 82px !important;
}
</style>';
}
// Change login link
add_filter('login_headerurl','loginpage_custom_link');
function loginpage_custom_link() {
return get_site_url();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment