Prevent redirect to wp-login.php

I guess you don’t have code on your new login form that supports ?action=lostpassword ?

Your choices are either

  1. copy the relevant code from wp-login.php to your new form; you want the retrieve_password() function. Then you can post back to /login?action=lostpassword.
  2. use your own ‘lost password’ form, but post to /wp-login.php?action=lostpassword
    1. hook the lostpassword_redirect filter to choose where to redirect to after a successful reset
    2. hook the lostpassword_url filter to point to your form, so that it’ll redirect there on errors
  3. rather than add a new form, use the default wp-login form instead but with your own styling?