-
-
Save jimboobrien/fd3049a13f9724ffe62f2a51ad4d019e to your computer and use it in GitHub Desktop.
Customize the login form in WordPress
This file contains hidden or 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 | |
/** | |
* Customize the login form in WordPress | |
* @author Micah Wood <[email protected]> | |
*/ | |
/** | |
* Change the href for the logo link on login page to point to the main site | |
*/ | |
add_filter( 'login_headerurl', 'change_login_headerurl' ); | |
function change_login_headerurl(){ return home_url(); } | |
/** | |
* Change the title attribute for the logo link on the login page to be the tagline | |
*/ | |
add_filter('login_headertitle', 'change_login_headertitle'); | |
function change_login_headertitle(){ return get_bloginfo('description'); } | |
/** | |
* Add our custom css and background image to the header of the login page | |
* Note: You will need to adjust the URL to point to a valid image file | |
*/ | |
add_action('login_head', 'change_login_head'); | |
function change_login_head(){ | |
echo '<style type="text/css">#login h1 a { background: url("../images/logo.png") no-repeat; }</style>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment