Restrict Posts/Pages/Custom Post Types

Restrict Posts/Pages/Custom Post Types

WooCommerce Membership Made Easy allows you to restrict entire post/page/custom post type and redirect restricted users to a custom page with restriction message. You can restrict posts for guests, members, specific user roles, specific users and membership levels.

Content of restricted posts/pages will be hidden from Category, Tag, Taxonomy, Archive, Author pages as well as RSS feeds. Simple restriction message will be displayed for restricted posts on these pages.

Let’s see how we can enable restrictions from post/page create or edit screens.

Using Restriction Settings

You can go to Posts -> Add New or Pages -> Add New to see the available restriction settings. Meta box with restriction settings will be displayed under the post/page editor as shown in the following screenshot.

post-restriction-1

These settings are also available for any Custom Post Type created from any third party plugin.

First, you have to select the Visibility of the post/page. By default, its visible to everyone viewing your site. You have 5 other options called Guests, Members, Selected Users, Selected User Roles and Selected Memberships.

  • Guests – Allows you to make the post/page visible only to guest users who doesn’t have a user account.
  • Members – Allows you to make the post/page visible only to members who have a user account and logged into the site.
  • Selected User Roles – Allows you to make post/page visible only to the selected user roles
  • Selected Users – Allows you to make post/page visible only to the selected users
  • Selected Memberships – Allows you to make post/page visible only to the users with an active selected membership

If you choose Selected User Roles option, you will get another setting called Allowed User Roles as shown in the following screenshot. You cam select the user roles allowed to view this post/page.

post-restriction-2

If you choose Selected Memberships option, you will get another setting called Allowed Memberships as shown in the following screenshot. You cam select the membership allowed to view this post/page.

post-restriction-3

If someone is not allowed to access the post/page, they will be redirected to the URL specified for Post/Page Restriction Redirect URL setting as shown in the following screenshot.

post-restriction-4

[mpc_textblock content_width=”100″ font_color=”#ffffff” font_size=”22″ margin_divider=”true” mpc_tooltip__border_divider=”true” mpc_tooltip__padding_divider=”true” class=”wpexpert-wpro-ad-free-docs-static-text”]WooCommerce Membership Made Easy[/mpc_textblock][mpc_animated_text duration=”1000″ delay=”2650″ text_font_preset=”mpc_preset_17″ text_font_color=”#ffffff” text_font_align=”center” text=”Simple Setup|||Advanced Restriction Rules|||Membership & Private Page Management|||Priority Support” text_border_divider=”true” text_padding_divider=”true” disable_sides=”true” sides_font_preset=”mpc_preset_17″ sides_font_color=”#ffffff” sides_font_align=”center” border_divider=”true” padding_divider=”true” margin_divider=”true” class=”wpexpert-wpro-ad-free-docs-animated-text”][mpc_button preset=”mpc_preset_29″ url=”url:http%3A%2F%2Fbit.ly%2F2sssrw8|||” font_preset=”mpc_preset_20″ font_color=”#ffffff” font_size=”16″ font_transform=”uppercase” font_align=”center” title=”VIEW MORE” background_color=”#2bb3e7″ border_divider=”true” border_css=”border-top:2px;border-right:0px;border-bottom:2px;border-left:0px;border-color:#ffffff;border-style:solid;border-radius:0px;” padding_divider=”true” padding_css=”padding-top:12px;padding-right:32px;padding-bottom:12px;padding-left:32px;” margin_divider=”true” margin_css=”margin-top:11px;” hover_font_color=”#2bb3e7″ hover_background_color=”#ffffff” hover_background_effect=”expand-horizontal” hover_background_offset=”0″ hover_border_divider=”true” hover_border_css=”border-radius:0px;” mpc_tooltip__border_divider=”true” mpc_tooltip__padding_divider=”true” class=”wpexpert-wpro-ad-free-docs-button”]