Multiple "login redirect" pages?
-
I’m currently using the following code to redirect the user after login:
add_filter( 'wpmem_login_redirect', 'my_login_redirect', 10, 2 ); function my_login_redirect( $redirect_to, $user_id ) { // return the url that the login should redirect to return 'http://www.domain.co.uk/page/'; }
However I have created a second login page, and I want to redirect the user to a different page if they login here. How do I do this?
At functions.php level, WordPress doesn’t actually know what page the user is on right? This is from experience.
Is there a better way to acheive this?
- The topic ‘Multiple "login redirect" pages?’ is closed to new replies.