Restrict Content to registered users only. This is a simple 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, and Subscribers.
Content restriction works both with shortcodes and drop-down menu of access levels for post, pages, and most custom post types.
Pro version available!
The Pro version of Restrict Content provides a significant additional feature set, including:
- Account registration
- Log in and password reset forms
- Complete member management
- Discount codes
- Payment tracking
- Integration with popular payment systems, including Stripe, PayPal, 2Checkout, and more.
- And much more. See the Features page for additional details.
Check out Restrict Content Pro.
- Upload restrict-content to wp-content/plugins
- Click “Activate” in the WordPress plugins menu
- Go to Settings > Restrict Content and customize the Message settings
- 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:
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?
No, this free plugin simply provides options to restrict content to existing user accounts. The Pro version does, however, include frontend registration and log in forms, along with much, much more. See the Features page for details.
- Does this plugin support custom user roles?
Not at this time.
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!…
I use Restrict Content Pro to restrict content for paid members on my guitar lesson site http://countryguitaronline.com and I’m very happy with the plugin. It’s powerful, easy to use, and it has several nice shortcodes available. The developers also provide great support and answer tickets quickly. Thanks for such a great plugin!
Activated it. On admin I set up a page to be only accessed from “Subscriber”(default wordpress role), managed to view the page even if not logged in.
First off – Thanks for this plug-in – very simple and works great! But I had to bend a bit to get what I needed. (Described below)
I don’t know as the following are “Issues” but I do have few items that might make it a bit better:
On one of our sites (and we have many), we only have 2 user types; admin and a non-standard user I called “dealer”. I created this user with the “User Role Editor” plugin.
Certain pages should not be available to any one but those 2 user types (basically anyone logged in). I really just wanted to redirect anyone else happening on those pages to a login page, but could not do this. Unless I missed something, I saw no redirect options available, only restriction messages. Might it be nice to allow for a simple “routeto” setting default option to allow this? And perhaps in the [restrict] short code itself [restrict routeto=/restrictpage_handlerpage] or something like that.
In the mean time, this might help some else – What I did to get around this is a bit clunky but worked.
In Restrict Content settings, in “Restricted Message” I put -> <script>window.location.replace(‘/login’); </script> so on page load, if [restricted], it redirects where I need… (which is a login page created by another plugin “theme my login”)
Apparently the user types are hard coded, so when I added the user type it was not available to selects on individual pages. So I needed to put in the [restrict] short codes on pages instead of selecting from “User Level Drop Down” (since [restrict] blocks all “Un”logged in users – Which worked for our purposes). It would be nice if this plugin could handle other added users, not just WP out of box users.
Also, putting the [restrict] on the page causes a bit of formatting issues in Visual Composer, VC keeps wanting to wrap the [restrict] so I get extra spaces. its just a pain since I did not want to put [restrict] on the page at all.
From the above “User Level Drop Down” you can’t select more than one user level (or all/any logged in user) for a page, again it would be nice to have that dexterity in the [restrict] short code also. [restrict to=Administrator,Editor,CustomUser…]
Hopefully I got this described all right. Over all I am very happy to be using the plugin – thanks for building it!
After reading some 1-star reviews and hesitated. I finally installed and found that this plugin is very good! Easy to use and works as describe.
If you don’t want other great features on Pro version, you can use with Profile Builder plugin (free) for the registration page.
Simply what I was looking for. Simple and easy page restriction. Thank you! Works smoothly on 4.6.1
Contributors & Developers
“Restrict Content” is open source software. The following people have contributed to this plugin.Contributors
- 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.