Last active
August 29, 2015 14:04
-
-
Save dirtystylus/b8f9bbcc1fce28670b8e to your computer and use it in GitHub Desktop.
WordPress Custom Login Screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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