In this tutorial, you will learn how to redirect your WordPress users back to the referring page or the previous page they were viewing before logging in. Doing this improves the user experience of your membership site.
Building the Login Form
- Hover on ProfilePress and click on Forms & Profiles
- Click on Add New and select the Login form type
- Enter a name for the form
- Select your preferred template
- Design the form with the drag & drop builder or Advanced form builder.
You can preview how the form will look like by clicking on the “Live Preview” button.
Save the changes.
The last step is to add the login shortcode to a page.
Redirecting Users to Referrer Page After Login
Go to ProfilePress >> Settings >> General >> Redirections.
In the “Login” section, select the “Previous/Referrer page” option to set up the redirection of users to the referrer page or previous page after they are logged in.
We have another article that demonstrates how to redirect members after login based on their user roles.
If you have any pre-sale questions, inquiring or contributions, please get in touch.