Title: Make posts private based on viewing user&#039;s role
Last modified: August 30, 2016

---

# Make posts private based on viewing user's role

 *  [keytastic](https://wordpress.org/support/users/keytastic/)
 * (@keytastic)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/make-posts-private-based-on-viewing-users-role/)
 * I want to make it so that posts are automatically made private, but also be completely
   visible to other users _if_ they have the same user role. Additionally, Administrator
   posts should _always_ be visible no matter the role. In order to make this work
   most effectively, I would create additional user roles (using the User Role Editor
   plugin, most likely) which all had Author privileges.
 * I’ve tried a few plugins already, but none of them seem to be automatic or they
   don’t work quite right. Plugins I’ve tried:
    - Advanced Access Manager
    - Restrict User Access
    - User Access Manager
 * Is there another plugin that I simply haven’t tried? Can something like this 
   even be done? As it stands now, I am learning PHP — which I want to do anyway—
   but I’m wondering whether or not this is possible.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/make-posts-private-based-on-viewing-users-role/#post-6745533)
 * I don’t know of any plugins, but a custom coded solution is certainly possible.
   If you’re willing to put in the time, nearly anything on the front end is possible
   and most things on the back end as well. There’s very few restrictions, but the
   ones that exist are very important. Never alter core code, nor other’s themes
   and plugins for that matter. Only use filter and action hooks to change things.
   You should be able to find a hook to alter anything in core. For themes and plugins,
   it depends on the author, some are really good, others provide nothing at all.
 * If you need to directly request your own PHP page, there are limited ways to 
   initialize the WP environment. Requiring or including wp-load.php or wp-blog-
   header.php is NOT how to do this, despite many examples that do just that.
 * And most importantly, have fun 🙂
 *  [Prpl](https://wordpress.org/support/users/grvrulz/)
 * (@grvrulz)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/make-posts-private-based-on-viewing-users-role/#post-6745549)
 * Hi keytastic,
 * I think the plugin [Members by Justin Tadlock](https://wordpress.org/plugins/members/)
   might be the solution to your problem. Even if it doesn’t solve it 100%, it provides
   an extendable base to build your own solution on top.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Make posts private based on viewing user's role’ is closed to new replies.

## Tags

 * [post](https://wordpress.org/support/topic-tag/post/)
 * [private](https://wordpress.org/support/topic-tag/private/)
 * [role](https://wordpress.org/support/topic-tag/role/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 3 participants
 * Last reply from: [Prpl](https://wordpress.org/support/users/grvrulz/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/make-posts-private-based-on-viewing-users-role/#post-6745549)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
