Title: Caps &#8220;read_private_posts&#8221; do not work&#8230;
Last modified: August 18, 2016

---

# Caps “read_private_posts” do not work…

 *  [sashainparis](https://wordpress.org/support/users/alexisrael/)
 * (@alexisrael)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/caps-read_private_posts-do-not-work/)
 * OK, let’s be specific:
    in “capabilities.php”, you can find this function :
 * function map_meta_cap($cap, $user_id) {
    …
 * Where you have:
 *  case ‘read_post’:
    $post = get_post($args[0]);
 *  if ( ‘private’ != $post->post_status ) {
    $caps[] = ‘read’; break; }
 *  $author_data = get_userdata($user_id);
    $post_author_data = get_userdata($post-
   >post_author); if ($user_id == $post_author_data->ID) $caps[] = ‘read’; else 
   $caps[] = ‘read_private_posts’; break; …
 * As you can see, a capability is ready just to make nice work:
 * READ_PRIVATE_POSTS
 * So I made a copy/paste in the role manager plugin (many thanks to Owen Winkler
   and David House) to create a “read_private_posts” capability and grant some roles.
 * Well, when logged as a granted user I can not see any private post from other
   users… So what is the point? Is there a second filter somewhere (this would be
   quite weird)?
 * I really need your help here!
    Current version where tested: WP 2.0.2
 * Alex
 * PS: I am sure we can use some plugin to make some tweaking stuff but it should
   be working as simple as it is – and it seems to be a bug…

The topic ‘Caps “read_private_posts” do not work…’ is closed to new replies.

## Tags

 * [capability](https://wordpress.org/support/topic-tag/capability/)

 * 0 replies
 * 1 participant
 * Last reply from: [sashainparis](https://wordpress.org/support/users/alexisrael/)
 * Last activity: [19 years, 10 months ago](https://wordpress.org/support/topic/caps-read_private_posts-do-not-work/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
