Hello,
I have a login box in my sidebar that works beautifully thus far. However, I'd like to redirect users to a different page (instead of wp-login.php) when they enter their username or password incorrectly. The sidebar code is as follows:
<form action="<?php bloginfo('url') ?>/wp-login.php" method="post">
<div id="reg_or_login">
<a href="<?php bloginfo('url') ?>/register">Register</a> or Log in:
</div>
<div id="user_prompt">
Username: <label for="log"><input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="13" /> </label>
</div>
<div id="pwd_prompt">
Password: <label for="pwd"><input type="password" name="pwd" id="pwd" size="13" /> </label>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
</div>
<div style="display: inline;" class="buttons">
<button type="submit" style="font-size: 1em; display: inline; float: none;" class="">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/icons/group_key.png" alt=""/>
Login
</button>
</div>
<div id="lost_pwd">
<a href="<?php bloginfo('url') ?>/lost-password">Lost Password?</a>
</div>
<div class="breakfree"></div>
</form>
I've struggled with this for quite a while now, so any help at all would greatly be appreciated!