Reply To: Replace the WP login/registration page
› Forums › General › Replace the WP login/registration page › Reply To: Replace the WP login/registration page
For a login from the same page he’ll be taken back to, yes. The login widget would need to be on the same page he’ll be taken back to, and the widget configured to redirect the person to the “previous” (i.e. the one where the widget is when he uses it) page after login.
If you start the login from another place and want the person to end in a particular URL, there are a couple of ways:
If you link to wp-login.php, you’d do http://example.com/wp-login.php?redirect_to=/the-page-you-want-him-taken-to/ and after logging in he’ll be taken to the redirect_to address.
If you’re using the s2 Pro login widget via PHP, see: http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_s2member_pro_login_widget()
<?php s2member_pro_login_widget("login_redirect" => "http://example.com/the-page-you-want-him-taken-to/"); ?>