search
Partners Support Log In
Frank Hagan
Updated

Contents

    Back to Top

    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.

    1. Create the various membership pages for each membership level in WordPress. In this example we’ll use Bronze, Silver and Gold membership levels.
    2. 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"
    3. 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"
    4. 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
    5. 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.

      WordPress Editor with Text tab selected
    6. 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:
      1. Gold members redirect immediately (0 seconds)
      2. Silver members redirect after 2 seconds
      3. Bronze members redirect after 5 seconds
      4. 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]
    7. Save the page.
    8. 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):
      1. Any other "membership" plugin
      2. Any plugin that manages "redirection"
      3. Caching plugins
      4. All in One SEO
      5. Backup Buddy
      6. Page Expiration Robot or Scarity Samuri
      7. User Role Editor
      8. 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

    Articles in this section

    Created - Updated
    Have more questions? Submit a request

    Comments

    • Avatar
      Permanently deleted user

      What's the suggestion if you host 2 or more programs on one site (with one login)?