I have used Jeff Star’s tutorial for creating my own custom login form http://digwp.com/2010/12/login-register-password-code/. It works great, but I have one problem. On the reset password form, if someone enters their username incorrectly (so that it doesn’t verify), they get kicked to the default wp-login.php?action=lostpassword with the error message.
Is there a way to redirect to my own error page?
Thanks!
The code he posted in that tutorial (very nice BTW) post’s the form to the build-in “reset password” module which redirects to the login.php on error, but you can change that and build your own based on the original and add it to the template page, change:
to:
Here is an updated version of the code from @bainternet with the syntax errors corrected, the suggestion by @Val and the key generator from wp-login.php 3.4.2:
I was still encountering issues with the reset key not working properly, the link in the email would redirect me to the standard password reset page with the URL parameter indicating a problem with the key, so I more closely followed the wp-login.php file and included the $wp_hasher object, this fixed the problem and the password reset in the email now works