Redirect registration and logic page
Hi Rahul,
How do I avoid anspress to follow wp-login.php login page. I have created my own login and registration page. How do I redirect anspress to it
Rahul Aryan deleted answer
@Anup – here you are – please these two functions in your functions.php (child theme)
add_filter( ‘login_url’, ‘change_login_page’, 10, 3 );
function change_login_page( $login_url, $redirect, $force_reauth ) {
return home_url( ‘/login’ . $redirect );
}
add_filter( ‘register_url’, ‘change_register_page’, 10, 3 );
function change_register_page( $login_url, $redirect, $force_reauth ) {
return home_url( ‘/register’ . $redirect );
}
Obviously, change “/login” and “/register” to match the actual URL you want to use
I have a similar issue here. Could hard code it, but would rather do it with a function or hook.