Skip to content

Instantly share code, notes, and snippets.

@spearsmarketing
Last active December 12, 2015 07:28
Show Gist options
  • Save spearsmarketing/4736622 to your computer and use it in GitHub Desktop.
Save spearsmarketing/4736622 to your computer and use it in GitHub Desktop.
WordPress custom login logo code.
// Change login logo
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: 215px 138px !important;
width: 215px !important;
height: 138px !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