Login Redirect by Membership Level
About Redirecting by Membership Level
Applies to: ONTRAPORT Plus and above.
The PilotPress plugin adds powerful membership functions to WordPress. By default, customers are redirected to a single page after login. To redirect customers to different pages depending on their membership level, Shortcodes provided by PilotPress can be used on that page. The customers land on the page initially, and are immediately redirected to the page you specify in the Shortcode.
Create a Redirect Landing Page for Membership Levels
Shortcodes in WordPress are capable of functionality beyond showing and hiding content on a page. One advanced use is creating a redirect Landing Page for all customers.
- Create the various membership pages for each membership level in WordPress. In this example we’ll use Bronze, Silver and Gold membership levels.
- Copy the URLs for each of these WordPress pages to a text file for use later. In this example, we’ll use "http://your-domain.com/bronze", "http://your-domain.com/silver" and "http://your-domain.com/gold"
- Create the initial Landing Page that will redirect your members based on their membership level. For this example, it is named “Welcome!” and is at "http://your-domain.com/welcome"
- To redirect the customer based on their membership level use the HTML <meta http-equiv =" attribute. By nesting the attribute inside the shortcode it acts only for that membership level. The attribute syntax is: <META http-equiv="refresh" content="0;URL=http://your-domain.com/page-name" />
- Where 'content="0;' specifies the number of seconds to wait before redirecting
- And "http://your-domain.com/page-name" is the page to redirect to
- On the “Welcome!” page, insert the shortcodes to redirect the customers based on membership level. Use the Text tab in the WordPress editor to insert the shortcodes because of the raw HTML you will be entering. The Text tab is on the right in the image below.
- Adjust the 'content="0;' portion of the short code to force the order of the refresh for members with multiple membership levels. In the example:
- Gold members redirect immediately (0 seconds)
- Silver members redirect after 2 seconds
- Bronze members redirect after 5 seconds
- A member with both Bronze and Gold memberships will be redirected to the Gold member page immediately, before the Bronze member redirect has an opportunity to act
[show_if has_one="Gold"] <META http-equiv="refresh" content="0;URL=http://your-domain.com/gold/" /> [/show_if]
[show_if has_one="Silver"] <META http-equiv="refresh" content="2;URL=http://your-domain.com/silver/" /> [/show_if]
[show_if has_one="Bronze"] <META http-equiv="refresh" content="5;URL=http://your-domain.com/bronze/" /> [/show_if]
- Save the page.
- Customer redirect settings in PilotPress can be accessed by going to Settings menu > PilotPress > Customers Redirect To. Change the setting to your "Welcome!" page and click "Save Changes".
Testing the Shortcodes
Wordpress Administrators are "cookied" by WordPress. WordPress will read the Administrator's cookie even while logging in as another user. Private and incognito modes in your browser will not prevent WordPress from reading the Administrator cookie. Because of this, the redirect shortcodes may appear to fail. To test the shortcodes and other membership functions we recommend the following process:
- Create a new Contact for testing purposes. Add a Membership level to the contact. Keep ONTRAPORT open to this contact record.
- Open a new private tab or window in your browser (see instructions for Firefox and Chrome).
- In the private tab or window, clear the cookies for your Wordpress site. This step is required. To see instructions on how to clear your cookies, click HERE.
- Go to the default WordPress login page by adding "/wp-login.php" to your domain: http://your-domain.com/wp-login.php
- Log in as your new contact and verify the shortcode redirection.
- To test a new membership level, log the contact out of Wordpress. Add the new membership level in ONTRAPORT and log the contact back into Wordpress.
Troubleshooting Notes
- You must use a private browsing window and clear your site's cookies in order to log in with a Contact's login credentials.
- Other plugins may interfere with PilotPress, including (but not limited to):
- Any other "membership" plugin
- Any plugin that manages "redirection"
- Caching plugins
- All in One SEO
- Backup Buddy
- Page Expiration Robot or Scarity Samuri
- User Role Editor
- Login Form Editors (using redirection)
Check with Support if you believe you have a conflict with another plugin.
Important Notes
- The World Wide Web Consortium (W3C) recommends against using the HTML <meta> http-equiv Attribute as it can disorient users who expect to land on a certain page. In our usecase, you are redirecting the customer to an expected page.
- Because we are doing an immediate redirect, the “back” button on your customer’s browser may not work as expected. When they click “back” the page will appear to not change, when in fact they are visiting the “Welcome!” page and being redirected to the membership page again. Provide clear navigation options on the membership pages and provide a notice such as “Do not click the back button”.
- Add navigation information or other content below the redirect shortcodes on the “Welcome!” page. This will help customers redirected to that page who do not have one of the membership levels in your shortcodes.
WordPress Integration Resources
- WordPress Integration Overview
- Integrate an Existing WordPress Site
- Integrate a New WordPress Site
- Creating an ONTRAPORT Hosted WordPress Site
- Creating Membership Levels
- Protecting Content on Pages, Posts and Categories in WordPress
- Add Members and Drip Content in WordPress
- Add Custom Login Page and Password Reminder Functions
- Enable the Customer Center
- Enable the Partner Center
- Using Merge Fields and PURLS in WordPress
- Add ONTRAPORT Forms and Videos into WordPress
- Use Shortcodes to Show or Hide Content Based on Membership Levels (Advanced)
- Login Redirect by Membership Level (Advanced)
- OptimizePress Integration
- Choosing a WordPress Theme
- WordPress Integration FAQs
- WordPress Integration Troubleshooting
Articles in this section
- WordPress Integration Overview
- Set up Membership Quick Start
- PilotPress Settings
- PilotPress and the WordPress Editor
- Integrate an Existing WordPress Site
- Integrate a New WordPress Site
- Migrate From Another Membership System to ONTRAPORT
- Creating Membership Levels
- Protect Content on Pages, Posts and Categories in WordPress
- Testing PilotPress Content Protection
What's the suggestion if you host 2 or more programs on one site (with one login)?