Restrict Content

Description

Restrict Content is a simple membership plugin that enables you to easily restrict access to your content to logged-in users only.

Content restriction works both with partial content restrictions using shortcodes, as well as full page restrictions for post, pages, and most custom post types.

Restrict Content 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.

Features of the plugin

  • Limit access to content with a shortcode, i.e. [restrict]This content is limited to logged in users.[/restrict].
  • Limit access to full content via a simple interface on the edit post, page, and custom post type screens.
  • Display a registration form for new accounts on any page of your website with [register_form].
  • Display a log in form for existing users on any page of your website with [login_form].

A Pro version of Restrict Content is also available with an extensive feature set.

Restrict Content Pro features

  • 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.

Visit the Restrict Content Pro website for more information about the Pro version.

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

Restricted messages don’t work!

Entering messages into the “restricted” text field via the settings does not show on a page that is set to be restricted. So if you have a password set to the page, it doesn’t allow you to say “Please login…” at this other duplicated place, so that you can see the password field to enter this page’s password. I even tried the short code for if not logged in, so a person knows they need to sign in first, so that the system can see the user’s level, and then show another field for the page password. So convoluted.

Simple and works

I have been looking all day for a simple plugin that restricts access to a couple of pages on my website and have found this. Super simple to use [restrict] and [login_form] functions on my page.

Saw some hate on the reviews for this plugin, but wanted to say that this plugin is simple, and is completely compatible with my needs. I had it working with my pages in less than 5 minutes from installation (mileage may vary!).

Thank you to the plugin author!

An Unusable, Very Basic PlugIn

I was hoping to get a feel for the essential capabilities of this plugin in considering a Pro version. The free version doesn’t perform even the most basic functions advertised in it’s own description – if anything it’s an extremely poor marketing version that could even dissuade one to purchase the Pro version. Despite the description almost all of the options are only available in the Pro version. Very disappointing. For now I’ll consider other plugin options. The free version is a waste of time and gives the impression that the Pro version would be extremely complex or have a significant learning curve.

Doesn’t Work

Might as well say that the plugin is an ad for the pro version. It is supposed to restrict product access by role but you have to buy the pro version to actually use the feature.

Excellent but only for developers

This really is a very complex plugin with a ton of features, I am using the pro version, I needed something that could handle a complex multi tier membership structure and this does just about everything I need. You do need to be able to dip into php however to get the best out of it. No problem for me but it is not for the back bedroom amateur. Support is fast but there is an expectation by support that you have a good knowledge of the inner workings of WordPress, I have also found a few things that work even though support told me that it could not be done so I suspect that there is quite a lot of functionality in there that has not been fully documented. I am looking forward to see this being developed over the coming years as it is a very robust and stable plugin that just needs a push in the right direction to get that fifth star.

Read all 38 reviews

Contributors & Developers

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

Contributors

“Restrict Content” has been translated into 7 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.3

  • Fix: Registration now works properly if you have JavaScript disabled in your browser.

2.2.2

  • Fix: Content visibility in the REST API.

2.2.1

  • Tweak: Remove hard-coded red color from restricted message. A class rc-restricted-content-message has been added to the span tag if you’d like to add the color back in with CSS.
  • Tweak: The Restrict Content plugin is now auto deactivated when Restrict Content Pro is activated.

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.