When users successfully log in, log out or reset their password on your site, you can set a page or custom URL they should be redirected to. If you leave the “Custom URL” field empty the redirection will fall back to the selected page.
For Login redirection, there is the “Currently viewed page” option to redirect users to the page they are currently viewing after login. And “Previous/Referrer page” to redirect users to the referrer page or previous page they were on after login.
You can also set custom redirect per login and registration shortcodes via the
For example, a custom login page with the shortcode below will redirect users to the URL https://xyz.com/welcome after they are logged in.
[profilepress-login id="2" redirect="https://xyz.com/welcome"]
Similarly, a registration page with the shortcode below will log users in and redirect them to the https://xyz.com/welcome after they successfully create an account.
To redirect users to the previous page they were on after they are auto-logged-in, replace the “redirect” attribute with “previous_page” like this:
If you don’t want users to be logged in before the redirect happens, change “redirect” to “no-login-redirect” like so:
How about if you wish to redirect unregistered or non-logged-in users to your website login page when they try to access a post or page; use the following shortcode on the said post or page.
If you want them redirected to a custom URL, use the shortcode like so:
To redirect only logged in users to a custom URL, use the following shortcode:
Remember, if the user isn’t logged in, no redirection will occur. And omitting the
url attribute will cause the user to be redirected to the login page.