This plugin will very easily let you restrict content on your WordPress site to registered users. It permits you to restrict entire posts / pages or individual sections of content within a post or page.

Features

  • Restrict entire posts / pages.
  • Restrict sections of content.
  • Unlimited number of restricted areas.
  • Works with all Custom Post Types
  • Five restriction levels – uses WordPress’s regular user levels.
  • Hide content displayed in WordPress feeds.

Usage

First upload to wp-content/plugins and click activate from the WordPress plugins menu.

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 that can be used for showing content to users that are not logged in:

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

A premium version of this plugin can be found here.

Download for Free

Download
  1. Don

    After activating your plugin, I don’t get the options to “write messages” as you do.

    Also – once I restrict the content to Subscribers, no messages shows up, (to show the content is restricted) abut worse than that – if I click on the post name in the category list the whole of the restricted posts show ALL content.

    How can that be when I follow your instructions?

    It makes no point using the plugin – but of course I realise something is wrong, but what?

    Hope you can help – Thanks! ๐Ÿ˜‰

    • Pippin

      Sorry for the delay. The first thing to do is try switching to the default 2012 theme. This kind of problem is almost always caused by a poorly built theme.

  2. David

    Hi there,

    I did not realize this, but apparently the Restricted Content plugin does *not* provide any file protection, i.e., if you have the direct URL to the file in the Media library, you can access it even if it is only attached to a page whose content has been restricted using the plugin. I think a disclaimer should be added to the plugin until that hole is plugged.

    Are there plans to add this much-needed feature to the plugin?

    • Pippin

      That is correct. Sorry but no, I do not plan to introduce that, though you can do it with Easy Digital Downloads: https://easydigitaldownloads.com

    • Brandon

      That’s not a “Hole” like you mention, its intended behavior because of the nature of WordPress and the web. Anyone who is determined to “Steal” your content will be able to find a way even if that is right-click and view source to find your URL and paste it into the browser, or even go so far as to record audio output or video output from their computers. Shoot – even using base64 to encode your video to discourage 90% of people who would try to take content, there are still ways of decoding base64. (I suggest getting the URL from your media library, then taking it to bit.ly and then using that in your content instead of the media library link – atleast track the stats of the link and comparing those numbers against the amount of hits you get from valid users to test it and see if it is any amount of an issue like your suggesting it could turn in to)

      So although Pippin’s answer is short and direct, there is a reason he will not be adding this because it is a huge headache for what this plug-in was intended to do..

    • Pippin

      That is exactly correct, thank you Brandon.

  3. Feek

    I was wondering can the free eversion be used in theme files using <?php echo do_shortcode("[restrict userlevel=\"admin\"] [/restrict]“); ?>

    the reason why i asked is because this code above gets no errors, but also logged in as an admin you also don’t see the included file.

    • Pippin

      No it cannot, sorry.

  4. Rothbert

    Hi Pippin
    I’m currently using role scoper on a simple member site. RS hides all traces of the page or post which works for this site as there is no reason to display the title to people not logged in and better that it is hidden.

    I’m keen to replace RS with something clean and simple and was hoping to use Restrict Content which would have been perfect if it had an option to hide titles etc. I realise that RC retricts ‘content’ ๐Ÿ™‚ and my understanding is you don’t have any plans to go beyond that. Can you recommend a well built plugin that simply retricts the whole page or post, removing title, feed etc to logged in suscribers?
    Cheers

    • Pippin

      I’m not aware of any plugins that do that out of the box, sorry.

  5. Felipe Pimps

    Hello,

    Thanks for this free plugin!!!

    Is there a way to restrict content to another “usertype”???? I need to create 2 usertypes. One can read the article and another no, but I dont want this users be such like “editor” and etc because I dont want they can write or edit posts.

    PS: Sorry for my english.

    • Pippin

      No, sorry.

  6. wonkotsane

    This plugin would be perfect if it supported custom roles. I’m using User Role Editor to create extra roles and this plugin only recognises the default roles.

    • wonkotsane

      Ok, I hacked the plugin to give me some of the functionality I wanted – it now hides the page based on the new user roles I created. I didn’t hack the selective filtering bit because it means rewriting a sizeable chunk of code and if I was going to do that I may as well write my own plugin.

      This plugin would be great if it handled custom roles and it’s not that difficult for you to do if you want to broaden its appeal. Instead of hard coding the user roles in the drop down list, get the list of roles dynamically and your big if block for the roles is unnecessarily complicated and based on knowing in advance what roles are present, it could be cut right down to a few lines if you think about it logically.

    • Pippin

      Very nice!

      Adding support for custom roles has been on my todo list for quite some time.

      If you’re interested in sharing what you wrote, it might get official support added sooner ๐Ÿ˜‰

    • wonkotsane

      If you want to send me an email we can talk about it some more. I went for the lazy option and hard coded the new roles in the same way you did with the built in ones but I know what needs doing to make it support roles dynamically.

    • Pippin

      I’m interested in making it dynamic.

    • WebmaterAl

      It would be nice to see where you hard coded the new rolls because this is a function I will need to implement as well. Even if its just a band-aid for now. file names you edited and code-line number would be helpful.

    • Aaron Overton

      I made the shortcode part dynamic. I haven’t done the page metabox version yet. Was there any short-term plan to make this dynamic? I’d share what I’ve already done.

      I need this functionality for a project rather soon.

    • Pippin

      Not at this time, sorry.

  7. WebmasterAl

    Two questions,

    If the page is say restricted to “userlvl2” and a user with “userlvl4” tries to look at the page can they still see it. Users with a higher level see pages restricted to lower user levels. Editors and Super Users seeing what lowest level registered users can see.

    And the other question is. Can I set it so if a user tries to visit a URL that is restricted instead of them seeing any kind of message, it just simply redirected them to a user defined page. (login page /register page/home page/ fake page not found)

    Thank you

    • Pippin

      Users will always be able to see the page, but they won’t see the content of the page.

      You can redirect users away from restricted pages if you use the Pro version of this plugin.

  8. denye

    Hi ,

    what is the user level for access : [restrict] … [/restrict]

    • Pippin

      It is so that you can restrict the content to users of a specific role, such as Subscriber or Editor.

  9. carrie

    I like it.

  10. P R

    Sorry I am new to the membership aspect of websites… So I installed this plugin… very nice… I set a page to be for subscribers… but how do people subscribe?

  11. ThemeLocker

    Hello author!

    Thank you very much for your plugin, I am using it for some of my websites. You can visit it here http://themelocker.net

  12. Andลพs

    I develop new website for my nonprofit organisation and we havea lot of only logged in user content. Found your great plugin with shortcodes, everything works, until try to create new page…
    Then this error pops out –
    Notice: Undefined index: rcMetaNonce in /home/selonija/public_html/Selonija.lv/wp-content/plugins/restrict-content/includes/metabox.php on line 88

    WordPress 3.8.
    Installed plugins – a lot, but none other which deals with restrictions.

    • Pippin

      I will need to push out an update to fix that error. It shouldn’t hurt anything, however.

    • Ramon van Belzen

      this bug is annoying since it also appears in menus

  13. Antonio Gonzalez

    How can I restrict content only for not logged users?.

  14. Rita

    I want to provide a downloadable PDF for several posts. Could I be able to use this and restrict it to subscribers only?

    • Pippin

      No, the plugin does not protect file downloads.

  15. Rita

    Darn, do you know of a solution for protecting file downloads?

  16. Javier

    Hi, is there a way to put the link for login in the message, so people can login via the massage??? I really need it.

    Thanx

    • Pippin

      Yes, like this:

      message="<a href='http://yoursite.com/wp-login.php'>Login</a>
  17. Camron

    Hi

    I am using this plugin with Jobify, i followed your instructions but it doesn’t work. the content is still visible.

    Does this plugin work with jobify? or am i missing something?

    Thanks

  18. marko

    excellent plugin and works like a charm. thanks a lot!

  19. Lisa

    This plugin seems like exactly what I need (just restricting access to logged in users for just one page) … however, after installing it, I am unable to see any tabs when I go to “settings”, “restrict content”. (I just see a list of the short code options.)

    I’ve tried deactivating all of my other plugins (of which I only have a few) and changing templates…with no luck. Any suggestions?

    • Pippin

      Could you show me a screenshot of what you see?

    • Anne Katzeff

      Hi,
      I have the same issue as Lisa, which is I’m only seeing the shortcodes message settings. I’m using the plug-in for a client site http://revcarolbodea.com.

      What’s the scoop?

      thank you,
      Anne

  20. Goran

    Is it possible to set paid subscriptions to “Auto Renew” without the person registering having to click the “Auto Renew” button?

    Cheers

    G

    • Pippin

      Yes it is, there’s an option in the settings screen for it.

  21. mark

    What I am looking for is a way that, on the site, only the first 3 or 4 lines of any post appear, and that to see the rest of the post, people have to log in (for free). Is this possible with this plugin?

    • Merel

      Hi, did you find this specific plugin somewhere? I need this too. But can’t find the right ones, and I think i might not be searching with the right keywords.

  22. Gene

    Would anyone like to donate a copy of restrict content pro to me? After buying everything to get my site up and running I ran out of money, and no one told me id have to pay to restrict content. smh. Anyways I’d love whoever 4eva if they would donate me a copy…..If not I’ll still love you forever ๐Ÿ™‚ email copy to videoFXwizard@gmail.com THANK YOU>>>>>

  23. Gene

    P.S. Free version doesnt work thanks

  24. Iris

    Hi,
    this plugin is just what I need, but I have a problem with it.
    I can restrict posts and pages, but not comments.
    If someone comments a restricted post, the one who is not allowed to see the post, however can see comments to that post.
    How can I restrict comments too?
    Thanks

    • Pippin

      Comments are not protected by default, sorry. It is possible, but it requires some modifications to the theme template files.

  25. Iris

    Thank you,
    any advise to solve my problem?
    I need to let a contributor (or a different role) see only one specific post (and comments to it), but nothing else in the blog.
    He can partecipate to a kind of reunion only for a week and he can read and comment only the post he’ s allowed to.
    Is it possible to do?

Comments are closed.