Skip to main content
All CollectionsWebsite PlatformWordpress
Restricting Access to Pages
Restricting Access to Pages
Updated over a month ago

Introduction

Member Splash provides the ability to restrict access to pages on your site based on account type and/or payment status. A typical use case is clubs that have swimming only memberships and ones that include tennis privileges. You can use the access controls to limit access to court reservations to your tennis privileged accounts.

Screen Options

When you add or edit a page you can scroll down to the bottom where you will find a section labeled Member Access.

Note: If you don’t see it you may need to enable it by clicking on Screen Options at the top of the page and then checking the box next to Member Access.

Member Access

You will see the Member Access box offers options for restricting content based on payment status and account type. Simply check the box(es) next to each status or type and then click on Save (for a new page) or Update (for an existing page).

No Access Message

If you are restricting access you will also need to fill out the No Access Message box with the message that should be displayed to visitors who try to access content they do not have permission for. Typically you would want to tell members that must they must be logged and and meet specified conditions to view the page content. For a visitor without access permission the No Access Message will be displayed in place of the page content.

Adding a Login Form to a Restricted Page

To enhance user experience, you can also add a login form to the restricted page. This allows users to log in directly from the page they are trying to access. Depending on where you place the login form, the behavior after login will differ.

As a general note, if you put the shortcode in the 'No Access Message' box, then once the user logs in, they will be redirected to the page that is restricted upon successful login:

Otherwise, if you put the shortcode in the page itself:

The user will be redirected to their own 'Manage Account' screen.

Steps to Add a Login Form to a Restricted Page

  1. Edit the Restricted Page

    • Navigate to your WordPress dashboard.

    • Go to Pages and select the page you want to restrict.

    • Click on Edit.

  2. Scroll to the No Access Message Section

    • Locate the No Access Message box within the Member Access section.

  3. Customize the No Access Message

    • Enter the message you want to display to users who do not have access. For example:

      <center>You must be logged in to access this page. Please log in 
      below.</center>

  4. Insert the Login Form Shortcode

    • To display the login form within the No Access Message, add the shortcode [show_login_form] where you want the form to appear. For example:

      <center>You must be logged in to access this page. Please log in below.</center> [show_login_form]

  5. Save and Publish

    • After adding the shortcode, click Update to save your changes.

Redirect Behavior Based on Login Form Placement

Login Form Within No Access Message

Behavior A: User is redirected to the page they tried to access after login

  • Placement: The [show_login_form] shortcode is inserted inside the No Access Message box.

Example Setup:

<center>Please log in to access this content.</center> [show_login_form]

Login Form Placed Directly on the Page Content

Behavior B: User is redirected to their dashboard 'Manage Account Screen' upon login.

  • Placement: The [show_login_form] shortcode is added directly within the main content area of the page, not within the No Access Message.

Example Setup:

<center>You must be logged in to view this content.</center> [show_login_form]

Centering Your Message

To center your No Access Message, wrap your text with <center> tags as shown in the examples above.


Example Scenarios

  1. Login Form in No Access Message

    • User Action: Attempts to access the restricted page without being logged in.

    • User Sees:

      <center>Please log in to access this content.</center> [show_login_form]
    • After Login: Redirected back to the restricted page.

  2. Login Form in Page Content

    • User Action: Attempts to access the restricted page without being logged in.

    • User Sees:

      <center>You must be logged in to view this content.</center>

      And separately on the page:

      [show_login_form]
    • After Login: Redirected to the Manage Account screen.


Did this answer your question?