Restrict Content


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


  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


5 februari 2020
RCP wasnt very intuitive to me to set up at first, but when i got into the logic of customer/subscription/trials/notifications i have to say its working fine for me. So i switched to PRO. I tried other premium-content solutions and found for me that RCP does the job best. Also i have to thank the RCP team for excellent support and patience with me and my project. Thank you guys.
30 december 2019
This plugin has served me well for years already. After reading some of the negative reviews, I felt the need to post a positive one. My impression of most of the negative reviews is that those come from people that haven't properly read the plugin's features or from people that didn't get the plugin to magically do exactly what they wanted within two minutes and then blamed the plugin. In other words, I feel most bad reviews are undeserved. Anyway, onto my own review. Like I said I've been using this plugin for years and I'm perfectly happy with it. I've never had any single problem with it. Yes the features and capabilities of the free version are basic, but it's perfect for my use case (restricting certain pages to logged in users). The only issue I've had is when using this plugin combined with the W3 Total Cache plugin with browser cache enabled. This lead to users seeing the "you need to be logged in" message on a restricted page that they had already visited before logging in. But I found a workaround for that which also increased the user friendliness of my site in the process. What I did was I altered this plugin's "Restricted Message" to include a login prompt like so: <p>You need to be logged in to view this part of the website.</p><p>[not_logged_in][login-form][/not_logged_in]</p>. This way a user can log in on any restricted page, instead of having to navigate to the login page and then back to the page they wanted to view, which would then be served from the browser's cache and still display the "you need to be logged in" message unless the user manually reloaded the page. Since the act of logging in forces a reload of the page you're on, the actual content automagically appears, instead of the browser serving up the cached page. This is exactly the kind of issue that I've seen other users blame this plugin for, when in reality it's due to an interaction between this and another plugin. So take it from me, this plugin works. And if it appears it doesn't, it's worth investigating, because most likely there is something else going on that's causing it.
28 oktober 2019
Unfortunately, it seems to work for the standard user roles but does not include roles defined by another plugin.
Lees alle 47 beoordelingen

Bijdragers & ontwikkelaars

“Restrict Content” is open source software. De volgende personen hebben bijgedragen aan deze plugin.


“Restrict Content” is vertaald in 8 talen. Dank voor de vertalers voor hun bijdragen.

Vertaal “Restrict Content” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.



  • Note: Tested with WordPress 5.3.
  • Improvement: Display wp_signon() errors while processing login.
  • Fix: Typo in setting description.
  • Tweak: Adjusted plugin author name and URL.


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


  • Fix: Content visibility in the REST API.


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


  • 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


  • 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


  • Removed incorrect contextual help tab


  • Some general code cleanup and compatibility checks for WordPress 4.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


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


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


  • Added new [not_logged_in] short code.


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