Created
April 30, 2012 02:43
-
-
Save jubalm/2555074 to your computer and use it in GitHub Desktop.
wordpress - custom login style
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 | |
// Modify Logo URL | |
add_filter( 'login_headerurl', 'login_page_url'); | |
function login_page_url(){ | |
return home_url(); | |
} | |
// Modify Login Title | |
add_filter( 'login_headertitle', 'login_page_title'); | |
function login_page_title(){ | |
return get_bloginfo('title', 'display' ); | |
} | |
// Stylesheet override | |
add_action('login_head', 'login_page_logo'); | |
function login_page_logo() | |
{ | |
echo '<link rel="stylesheet" href="' . get_bloginfo('template_directory') . '/login.css" />'; | |
} | |
// Custom Login Message on Redirect | |
add_filter('login_message', 'login_page_text'); | |
function login_page_text() | |
{ | |
if(isset($_GET['reauth'])) | |
{ | |
return '<p class="message">You need to login to view this content</p>'; | |
} | |
} | |
?> |
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
.login h1 a { | |
background: url(../img/logo-login.png) no-repeat top center; | |
width: 165px; | |
height: 165px; | |
text-indent: -9999px; | |
overflow: hidden; | |
padding-bottom: 15px; | |
display: block; | |
margin: 0 auto; | |
} | |
input.button-primary:hover, input.button-primary:active { | |
border-color: green; | |
background: green; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment