Following hook not work when I use bbpress with wordpress,
function passurl_update($lostpassword_url, $redirect ) {
return site_url().'/forgot-password/';
}
add_filter('lostpassword_url', 'passurl_update', 10, 2);
To restrict user from accessing default lost password page
function my_redirect_home( $lostpassword_redirect ) {
$lostpass_page =site_url().'/lost-password/';
wp_redirect($lostpass_page);
exit;
}
add_filter( 'lostpassword_redirect', 'my_redirect_home' );