Skip to content

Instantly share code, notes, and snippets.

@dirtystylus
Last active August 29, 2015 14:04
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 dirtystylus/b8f9bbcc1fce28670b8e to your computer and use it in GitHub Desktop.
Save dirtystylus/b8f9bbcc1fce28670b8e to your computer and use it in GitHub Desktop.
WordPress Custom Login Screen
/**
* Implement Custom Admin Logo
*/
function new_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url('.get_template_directory_uri().'/images/THEME-LOGO.png) !important; width:321px !important; height: 243.56px !important; background-size: 321px 243.56px !important; }
</style>';
}
add_action('login_head', 'new_custom_login_logo');
/**
* Implement Custom Admin Logo URL
*/
function new_wp_login_url() {
return home_url();
}
add_filter('login_headerurl', 'new_wp_login_url');
/**
* Implement Custom Admin Title
*/
function new_wp_login_title() {
return get_option('blogname');
}
add_filter('login_headertitle', 'new_wp_login_title');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment