MemberPress Rules Intro
What you'll see in this video: a basic run-through of the MemberPress rules and associated settings.
MemberPress URI Rules Explained
What you'll see in this video: a more in-depth explanation about MemberPress Custom URI Rules.
Member Specific Rules
MemberPress supports per-member rule settings (not shown in the above videos). When creating or editing your rule, you can now select from the first drop down in the Access Conditions section. Selecting "Member" will allow you to type in the username of a user you would like to have access through that rule. This can be in addition to any other condition(s) that you may have for the rule. Note: by adding a specific member to a rule, they will have access to the specified content regardless of membership status. Meaning, the user does not need to be subscribed to any membership, to still gain access to the content. Where possible, we recommend that you protect your content based on your Memberships, not based on individual members, however you may have a specific use case where this comes in handy.
Roles & Capabilities Rules
MemberPress also allows you to specify content protection Rules based on a user's WordPress Role(s) and/or Capabilities. We don't typically recommend using these unless you have a very specific reason to do so. Such as migrating from Members to MemberPress and maintaining the existing accesses you had based on roles/capabilities. Where possible, we recommend that you protect your content based on your Memberships, not based on Roles or Capabilities.
A Basic Breakdown of MemberPress Rules
After you have created at least one Membership, you can then set up Rules to protect certain pieces of site content from non-subscribed members. The following options are available for Rules.
Important Note: Administrators can always access content, regardless of the Rules, so be sure to do your testing with non-administrator User accounts.
- All Content - This allows you to protect all content. However, it is not as easy as it seems. You should exclude certain MemberPress pages that need to stay public, for the proper functioning of your website. Those include (but not limited to), Login page, Account page, Membership registration pages, and Unauthorized redirect page (if set).
You might need to add some other, non-MemberPress related pages to the exclusion list, like "Contact Us", "About Us" and similar, but that is entirely up to you.
- All Content Categorized - Same as above, but protects all content based on a category applied.
- All Content Tagged - Same as above, but protects all content based on a tag applied.
- A Single Post - This allows you to protect one individual post.
- Posts Categorized - This allows you to protect any post(s) which has been assigned a certain category. Using categories in WordPress is a great way to keep your membership content organized.
- Posts Tagged - This allows you to protect any post(s) which has been tagged with a specific tag. This is similar to the Categories rule but gives you a bit more control over how you want to organize your membership content.
- All Posts - This allows you to protect all posts on your site at one time. Be sure to use this option with caution as it can conflict with other Rules you may have set already such as "A Single Post", "Posts Categorized", or "Posts Tagged".
- A Single Page - This allows you to protect one individual page.
- Child Pages of - This allows you to protect all children of the selected page. A child page in WordPress is any page in which you set a "Parent" value when creating/editing the page.
- All Pages - This allows you to protect all pages at once. Be sure to use this option with caution as it can conflict with other Rules you may have set already such as "Child Pages of" and "A Single Page".
- Partial - Select this option if you only plan to use this rule to hide partial content with the use of a Shortcode or PHP Snippet (See here)
- Custom URI - Allows you to protect files and pages by what's in the URL. Read this page for more information on protecting files.
- Custom Post Type - Any custom post types that you have created will appear in the drop-down menu when selecting rule type. You will have the option to protect any of the custom post types based on all custom post types or one individual custom post for the one you have selected.
Account page advice: We recommend to exclude the Account page from any rule because it is by default, inaccessible to non-logged in visitors of your website. If you protect that page additionally, once a members' subscription expires, they would not be able to access the Account page in order to update their credit card details, for instance. That will create more work for you and will not contribute to data protection in any way.
Drips and Expiration's - For a more detailed explanation of how these settings work, please see this page. You can set a time for the Rule to drip (become available) or expire (become unavailable) based on any "X" amount of days, weeks, months, or years after a trigger has been made. The triggers you can select are when the member registers (meaning on your site), after a fixed day in the future, or after they purchase any or a specific membership on your site (all created memberships will appear as options). So let's say you have 12 protected posts, and you want the member to have access to only one post per month after they signup. Well enabling drips and expiration's will allow you to do this easily, and much more.
Redirecting Unauthorized Users - If you would like to redirect unauthorized users to a specific page instead of just showing them your default or custom unauthorized message on the page they are visiting, then you can enable that option in your MemberPress > Settings > Pages > Unauthorized Access section. If you are considering using this option, we strongly suggest you check out our video found on this page.
Advanced Options - Advanced users may also be interested in our PHP Snippets and Regular Expressions.