WordPress Simple Membership After Login Redirect add-on shows you how to redirect your members to page when they log in and more.
Last Updated: June 25, 2020
Latest News: Updated the documentation.
The following instructions shows you how to set up an after login redirect landing page for your members. This is important if you want to create a special page with instructions for your members based on their membership level. There is also an option available that allows the members to be redirected to the page or post they are logging from.
Simple Membership After Login Redirection change log version 1.3
- Added a new feature to enable redirection to the last page (where they clicked the login link) after the member logs in. You need to upgrade simple membership plugin for this to work.
What You Need:
WordPress Simple Membership After Login Redirect Steps
Note: In Simple Membership version 3.2.5, a new feature was added to enable redirection to the last page after login (where they clicked the login link).
Step 1 ) Go to WP Membership -> Add-ons as illustrated in the image below to install Simple Membership After Login Redirection add-0n. Make sure you activate the add-on.
Step 2 ) Go to WP Membership -> Membership Levels. Check to make sure the After Login Redirection Page field is added to all your members level’s as illustrated in the image below.
Step 3 ) Create a new page, post or simply add the URL of the page you want the members to be redirected too. I created a new page and named it Free Membership Page. I made sure I protected the page and only allowed the members corresponding to this page. In this example only the Free Level members can have access to this page.
- Yes, Protect this content
- Free Level
Step 4 ) The following image shows you the URL address of the page added to After Login Redirection Page field. Make sure you click on Edit Membership Level button to save your changes.
When the members belonging to the Free Level membership level log in, they will be redirected to the page added to the membership level. In this example I added the following URL, http://localhost/wordpress361/free-members-page/.
Redirect To The Last Page
Step 5 ) If you want your members to return to the same page they landed on after they click on the login link, then make sure you enable the following feature Enable Redirect to Last Page. This is located in WP Membership -> Login Redirection -> Enable Redirect to Last Page as illustrated in the image below.
Step 6 ) The following image, displays a post with content protected and the Login link to log in. The members need to click on this link to view the content.
Step 6-a ) The following image, displays the protect content after the member has logged in. You can see that the member was not redirected to the URL added above in Step 4 ) because the feature Enable Redirect to Last Page. is enabled.
Note: The login redirect addon LOOKS for the special login link that the core plugin creates. It then replaces that login link with an extra parameter. If you use the custom messages addon to override the standard protection message of the plugin then the login addon can’t add the extra parameter. This is one of those features where you need to pick one (You can’t get both). Also, if you click on the Login Widget on the sidebar or the Login in your menu it will not redirect the member to the page or post they are visiting.
Issue 1 ) Some have reported the following problem. When a user logs in and it is set to redirect to the previous page, the URL they are sent to excludes the ‘punctuation’ e.g. httpswww.mysite.org.ukmember-list. The “punctuation” has been converted to https%253A%252F%252Fwww.mysite.org.uk%252Fmember-list%252F. The %figures are then ignored in the redirect so “punctuation is removed”.
Issue 2 ) If you run into issues using this plugin/addon, you might like to read the following solution Back to page after login posted in the support forum.
Q1 I am also using Simple Membership Custom Message addon. How do I fix the redirect problem issue?
Answer 1: The redirection to the last page ONLY triggers if you click on the “Login” link from the protected content message that is shown inside a protected post/page. If you also have the following addon Simple Membership Custom Message installed and you alter the default message, the redirect to the last post will not get triggered and will not work. However you can try the following solution someone shared in the support forum.
Q2 The members are not redirected to the URL added in the membership level. How do I fix this issue.
Answer: Make sure the URL is not broken in other words when you enter the URL on the browser’s address you don’t get a 404 page not found error message. Also check your permalink structure, this can sometimes cause an issue.
Click on the following URL Form Builder to continue.
If you have any questions please let me know. I will be updating this tutorial from time to time.
Simple Membership Plugin Tutorial List: