Restrict Content

Description

Restrict Content to registered users only. This is a simple membership plugin that will allow you to easily restrict complete posts / pages to logged in users only. Levels of restriction may also be set.
For example, you can restrict content to only Administrators, Editors, Authors, Contributors, and Subscribers.

Content restriction works both with shortcodes and drop-down menu of access levels for post, pages, and most custom post types.

Also includes frontend forms for user registration, login, and password reset so your members can do all these actions on the front end of your site without going to the wp-admin or wp-login.php pages. Display these with the [login_form] and [register_form] shortcodes.

Pro version available!

The Pro version of Restrict Content provides a significant additional feature set, including:

  • Payments – including one-time payments and recurring subscriptions.
  • Integration with popular payment systems, including Stripe, PayPal Standard, PayPal Express, PayPal Pro, Authorize.net, 2Checkout, and Braintree.
  • Discount codes
  • Printable HTML invoices
  • Complete member management
  • Prevent account sharing
  • WooCommerce integration
  • And much more. See the Features page for additional details.

Installation

  1. Upload restrict-content to wp-content/plugins
  2. Click “Activate” in the WordPress plugins menu
  3. Go to Settings > Restrict Content and customize the Message settings
  4. Follow instructions below to restrict content

To restrict an entire post or page, simply select the user level you’d like to restrict the post or page to from the drop down menu added just below the post/page editor.

To restrict just a section of content within a post or page, you may use shortcodes like this:

[restrict userlevel=”editor”] . . . your restricted content goes here . . . [/restrict]

Accepted userlevel values are:
* admin
* editor
* author
* subscriber
* contributor

There is also a short code for showing content only to users that are not logged in.

[not_logged_in]This content is only shown to non-logged-in users.[/not_logged_in]

FAQ

Installation Instructions
  1. Upload restrict-content to wp-content/plugins
  2. Click “Activate” in the WordPress plugins menu
  3. Go to Settings > Restrict Content and customize the Message settings
  4. Follow instructions below to restrict content

To restrict an entire post or page, simply select the user level you’d like to restrict the post or page to from the drop down menu added just below the post/page editor.

To restrict just a section of content within a post or page, you may use shortcodes like this:

[restrict userlevel=”editor”] . . . your restricted content goes here . . . [/restrict]

Accepted userlevel values are:
* admin
* editor
* author
* subscriber
* contributor

There is also a short code for showing content only to users that are not logged in.

[not_logged_in]This content is only shown to non-logged-in users.[/not_logged_in]

Does this plugin include frontend log in or registration forms?

Yes! Frontend forms are provided for user registration, login, and password reset.

Does this plugin support custom user roles?

No. If you need custom role support, check out Restrict Content Pro

Reviews

so far this is a great plugin

I first created this review to request assistance with an issue I’m experiencing, only to discover a solution. I’m revising this entry to reflect that, so far, this has been a great membership plugin!

Very basic

Really very very basic. A lot of easy functions are missed. I don’t know how the Pro version is performing, but this free version does not tempt to buy the Pro one.

Does Not Work on WooCommerce /Shop/ Page

Installed on latest WordPress. Made one simple rule to block /shop/ by setting access ONLY to “customers” role. Despite that, any visitor can access the page.

Edit: Author was helpful and didn’t even mention the negative review when responding, and I admire that. While I had to move onto a diff plugin due to time constraints, I’m confident the author would have been helpful in supporting any issues I had.

Works cleanly and simply!

tested on 4.8 beta. Activated, edited page to be for subscribers only, set message for subcriber level access refusal.

Logged in user could access
Logged out user in other browser could not and message was displayed.

Clean, simple.

Doesn’t work

Installed on a site with an elegantthemes theme. Tried to restrict some posts so only “subscriber” role could read, but it restricted from admins and everyone. Nobody can read the posts (tried contributors & admins – didn’t try subscribers).

Also, there is no way to restrict by category. Time to code!…

Read all 33 reviews

Contributors & Developers

“Restrict Content” is open source software. The following people have contributed to this plugin.

Contributors

“Restrict Content” has been translated into 5 locales. Thank you to the translators for their contributions.

Translate “Restrict Content” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

2.2

  • New: Login form shortcode – [login_form]
  • New: Password reset form – part of the [login_form] shortcode
  • New: User registration form – [register_form] shortcode
  • New: Improved compatibility with Restrict Content Pro, allowing for seamless upgrades
  • Fix: Undefined index PHP notice
  • Tweak: General code cleanup and improvements

2.1.3

  • Fix: Undefined nonce index when saving some post types
  • Fix: Removed restrict metabox from post types that it does not apply to
  • Fix: Made restricted message shown in feeds translatable
  • Fix: Some text strings not translatable
  • Tweak: Added new rcp_metabox_excluded_post_types filter

2.1.2

  • Removed incorrect contextual help tab

2.1.1

  • Some general code cleanup and compatibility checks for WordPress 4.1+

2.1

  • Improved settings page to match core WordPress UI
  • Fixed problem with unescaped HTML in restricted messages options
  • Added complete internationalization on default language files

2.0.4

  • Added do_shortcode() to the not logged in short code

2.0.3

  • Fixed a problem with the not logged in short code.

2.0.2

  • Added new [not_logged_in] short code.

2.0

  • Added settings page with options to configure each of the messages displayed to users who do not have permission to view a page.
  • Improved the performance of several functions.
  • Better organization of the plugin files and improved infrastructure for soon-to-come new features.