My question is how do I customize the default WordPress login and register page without editing WP’s core files. I’m thinking more along the lines of a functions.php code.
Can anyone help me out by finding a tutorial or something? Remember, I don’t want to edit the WP core files. Thanks!
5 Answers
Here’s my functions.php that you can copy the functions. My CSS is admittedly thrown together fast and could be neater. I’m in a hurried launch phase right now. But you can use the functions. The first adds css to your head of the login page to override the styles. The later two functions change the url and title attribute of the logo link.
// LOGIN - custom style function my_login_style() { echo ' #login { background:none; border:0; box-shadow:0; -moz-box-shadow: none; /* Firefox */ -webkit-box-shadow: none; /* Safari, Chrome */ box-shadow: none; /* CSS3 */ } #nav { background:none; } form { -moz-box-shadow: 0 4px 18px #0b0b0b; -webkit-box-shadow: 0 4px 18px #0b0b0b; box-shadow: 0 4px 18px #0b0b0b; } #login form#loginform, #login form#registerform, #login form#lostpasswordform { border: 1px solid #fff; } #login h1 { margin-bottom: 10px; } #login h1 a { width:300px; height:85px; margin: 0 auto 31px; } #login form#loginform #user_login, #login form#loginform #user_email, #login form#registerform #user_login, #login form#registerform #user_email, #login form#lostpasswordform #user_login, #login form#loginform #user_pass, #login form#loginform #openid_identifier { border: 1px solid #aaa; } #login form .submit input { background: #2bab44 url("zhttp://www.domain.com/site/themes/mytheme/img/login-button-gradient8.png") left top repeat-x !important; border: 1px solid #008717 !important; text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); padding: 5px 20px; } #login form .submit input:hover { background: url("https://www.my.com/site/themes/my/img/login-button-gradient7.png") left -24px repeat-x !important; border: 1px solid #2b8c35 !important; text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); } #login form .submit input:active { padding: 5px 20px; /*reqd here for some reason */ } body.login p#nav a { color: #888 !important; text-shadow:none; font-weight:normal; letter-spacing:0; } body.login p#nav a:hover { color: #88eb86 !important; text-decoration: underline; } .login #backtoblog a { display:none; } #login #login_error { font-size: 13px; font-weight: normal; text-shadow: none; margin: -11px auto 0; padding: 12px; width: 275px; background: #ffb5b4; border: 1px solid #db5858; -moz-border-radius: 10px !important; border-radius: 5px; } #login .message { font-weight: normal; color: #bbb; text-shadow: none; } #user_pass, #user_login, #user_email { background: #fff; } '; } add_action('login_head', 'my_login_style'); //// LOGIN - function to change link of logo on login page function my_login_custom_site_url($url) { return get_bloginfo('siteurl'); //return the current wp blog url } add_filter("login_headerurl","my_login_custom_site_url"); //// LOGIN - function to change link title of logo on login page (remove's WordPress' slogan) function my_login_header_title($message) { return False; /*return the description of current blog */ } add_filter("login_headertitle","my_login_header_title");