Created
September 22, 2012 03:36
-
-
Save arod2634/3765033 to your computer and use it in GitHub Desktop.
Customize Wordpress Admin Login
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
<?php | |
// Custom login styles | |
function custom_login_styles() { | |
echo '<style type="text/css"> | |
.login h1 a { background-image:url('.get_template_directory_uri().'/images/logo.png) !important; text-align: center !important; width: 350px !important; background-size: 234px; 82px !important;} | |
body {background-color: #F6F6F6!important;} | |
div.updated, .login .message {color: #fff !important; border-color: #950639 !important; background-color: #CF153D !important;} | |
</style>'; | |
} | |
add_action('login_head', 'custom_login_styles'); | |
// Changing the login page URL | |
function my_login_logo_url() { | |
return home_url(); | |
} | |
add_filter( 'login_headerurl', 'my_login_logo_url' ); | |
// Changing the login page URL hover text | |
function my_login_logo_url_title() { | |
return get_bloginfo( 'title' ); | |
} | |
add_filter( 'login_headertitle', 'my_login_logo_url_title' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment