Change the login page
We are simply using :
wp_login_url( $redirect );
Hence, you can simply use this hook to filter your login url:
add_filter( 'login_url', 'my_login_page', 10, 2 ); function my_login_page( $login_url, $redirect ) { return home_url( '/my-login-page/?redirect_to=' . $redirect ); }
Cheers.
Rahul Aryan commented
yep. 🙂
David Lab commented
and what is the code for the register URL?
David Lab commented
Rahul, also, the code you provided above direct me to the following URL: http://www.mysite.com/my-login-page/?redirect_to=http://www.mysite.com/anspress_title/ which doesn’t work
Rahul Aryan commented
Replace “my-login-page” to your userpro login page
Thank you Rahul! I add the above code in my theme function.php?