For various reasons you may want to have a membership website where each user (or group of users) is redirected to a specific page made for that user (or group of users). For example a photographer may want to display photos on a page for each client or a fitness instructor may wish to have specific workouts for defined groups of clients. In WordPress this is easy to do and, best of all, no paid plugins such as WishList Member or Membership by wpmudev are needed (yes, your membership site can be setup free).
What you need for your creating individual membership pages
The tutorial below assumes you have already setup a WordPress Website with the s2Member Membership Plugin (the free s2member works just fine). Any good theme should work well.
It is worth noting here that if you need very secure areas for your members (e.g. if you’re including information that has legal necessities to keep the data secure) then I’d recommend you rather use a secure service such as Basecamp or Zoho Projects. Using any membership plugin with WordPress is secure enough for most purposes however specific services such as Basecamp adds that extra security needed for very secure data needs (I’ve setup Basecamp and Zoho Projects for Financial Planners, Solicitors and others that require secure areas where to share information with clients and these work well).
How to setup a page per login with redirect to the users page
Below are the instructions to setup; a login for each user (the official name for a login or client or member in WordPress is called a ‘User’), a protected page for each user and a redirect so that when the user logs in they are automatically redirected to their page.
For the steps below it is assumed that you have installed, activated and completed basic setup of the s2Member plugin.
Setting up the login for your members
Our first step is to create a new user within WordPress with custom capabilities. This is simple but it is important to get it right.
- From your WordPress dashboard go to Users -> Add new.
- Fill the following fields as you require; username, email and password.
- In the Role field select Subscriber.
- In the Custom Capabilities field enter organicweb_test (this could be any word; just make sure that all groups of users have the exact same value in the Custom Capabilities field).
- Click the Add new user button.
- Test that you are able to login to WordPress using the username and password.
Setup a page for each member or group
- From your WordPress dashboard go to Pages -> Add new.
- Enter any title and any content (video, audio, images, text, downloads and any other content is suitable).
- Now we add the membership bits; Change Page Level Restriction to Require Level #0 (or higher) and add organicweb_test to the Require Custom Capabilities? field.
- Click the Publish button.
In the two steps we’ve completed so far, we’ve created a login for our member and created a page that the user may view. If you want a single page to be the landing page for multiple users (i.e. a group of members or clients) all you need do is ensure that each user in the group is assigned the same Custom Capability as assigned to the page (i.e. multiple users will share the same Custom Capability).
How to redirect users to the correct member page on login
Now we ensure that then the user logs into your WordPress website, they are automatically redirected to the page that contains information for that user. This requires the following step to be setup once so without further ado, follow the items below.
- From your WordPress dashboard go to s2Member -> General Options.
- Click Login Welcome Page.
- Change the Login Welcome Page field value to -Select-.
- In the Or, a Special Redirection URL? field enter http://www.example.com/%%current_user_ccaps%% (change example.com to your domain name).
- Click Save All Changes.
In the steps above we specify that when a user logs in, the Custom Capability assigned to the user is read and then the login is redirected to a page with the same Custom Capability.
That’s all there is to it. You now have a membership website where users are redirected to their own page upon logging in. If you need assistance with your WordPress membership contact us for help.