Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I found several plugins that prevent people from seeing certain widgets and posts. However, the posts I restrict still show up in all the places where you can see posts. They show up in search menus as well.

I'd like to have several groups, as is native to WordPress, who can only see articles for them. For example, general consumption posts such as 'how to set up email' can be seen by everyone who has an account, but have other posts such as 'how to use a unix terminal' accessible to a certain level of account holder. Right now, people in the first group cannot read articles from the second group, but the title shows up on the posts page, so the first group knows they're being blocked, and they have a lot of titles that clutter their interface which they can't access.

How can I prevent certain groups of users (say "readers") from even knowing that certain posts exist?

I was thinking about copying widgets and pages and making a unique one for each group, but I was wondering if there was a better way.

share|improve this question
    
Have you seen this question? I don't think it is what you mean, but for role-based hiding of actual menu items you can use my Nav Menu Roles –  helgatheviking Jun 26 at 21:51

2 Answers 2

up vote 1 down vote accepted

Ok, I found the permission read private posts so I revoked that privilege to the reader group and marked the articles I didn't want them to see as private. Doing any sort of permissions in WordPress feels kind of hacky, but this is a much better solution than modifying source code.

share|improve this answer
    
I found a plugin that instead of just marking things public or private, one could set different levels of privacy. However, it doesn't seem to work for this version of WordPress. –  JFA Jun 26 at 16:14

There are several ways to set the visibility for your blog content. You can set it on a per post/Page basis for public, private, or Password Protected, or make the entire blog private and Password Protected through the use of WordPress Plugins.

Visibility for posts and Pages is set from the Edit panel. The option is available under the "Publish" option normally found at the top-right of the Edit panel. The screenshot below shows the interface, with the relevant section highlighted in the red rectangle.

enter image description here

The default state for post and Page visibility is Public. Public visibility means that the content will be visible to the outside world as soon as it is published.

By clicking on the edit link next to Visibility: Public in the Publish options, you can choose from an expanded selection of visibility options.

enter image description here

The options are:

Public: The default, viewable to all. Password Protected: Clicking this radio button followed by "OK" causes a further text box to appear, into which you can enter a password. Private: This option hides the content from the public completely.

Password Protected content is not immediately visible to the outside world. Instead, visitors will see a prompt similar to this:

enter image description here

The title for your protected entry is shown, along with a password prompt. A visitor to your site must enter the password in the box in order to see the content of the post or Page.

Private Content Private content is published only for your eyes, or the eyes of only those with authorization permission levels to see private content. Normal users and visitors will not be aware of private content. It will not appear in the article lists. If a visitor were to guess the URL for your private post, they would still not be able to see your content. You will only see the private content when you are logged into your WordPress blog.

Once you change the visibility to private, the post or page status changes to "Privately Published" as shown. Private posts are automatically published but not visible to anyone but those with the appropriate permission levels (Editor or Administrator).

WARNING: If your site has multiple editors or administrators, they will be able to see your protected and private posts in the Edit panel. They do not need the password to be able to see your protected posts. They can see the private posts in the Edit posts/Pages list, and are able to modify them, or even make them public. Consider these consequences before making such posts in such a multiple-user environment.

enter image description here

share|improve this answer
    
Ok. The issue was that I had to revoke the privilege to read private posts first before this would be effective. As it is, this answer doesn't really address the issue at hand. –  JFA Jun 30 at 17:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.