This is straightforward.
-
Hook on init to detect the lostpassword page
-
If the user is not coming from your instructions page (which we defined by adding extra query parameter) he’ll be redirected to your custom page
-
In your custom page add the link to lost password page including the extra parameter we set to skip the redirection.
add_action( 'init', 'lostpassword_instructions' ); function lostpassword_instructions() { global $pagenow; if ( $pagenow == 'wp-login.php' && isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'lostpassword' && ! isset( $_REQUEST[ 'skip' ] ) ) { exit( wp_redirect( 'http://domain.com/lost-password-instructions' ) ); } }
Now on your custom page, something like that should work:
$url="http://domain.com/wp-login.php?action=lostpassword&skip=true";