WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a custom role called 'Gym' and custom post type (CPT) called 'Story'. Every Gym user can create a draft of a story and view their own story drafts.

My 'Story' CPT have got the following capabilities:

[cap] => stdClass Object(
            [edit_post] => edit_post
            [read_post] => read_post
            [delete_post] => delete_post
            [edit_posts] => edit_posts
            [edit_others_posts] => edit_others_posts
            [publish_posts] => publish_posts
            [read_private_posts] => read_private_stories
            [read] => read
            [delete_posts] => delete_posts
            [delete_private_posts] => delete_private_posts
            [delete_published_posts] => delete_published_posts
            [delete_others_posts] => delete_others_posts
            [edit_private_posts] => edit_private_posts
            [edit_published_posts] => edit_published_posts
            [create_posts] => edit_gymtopia_story

A Gym user have the following capabilities:

[read] => 1
[upload_files] => 1
[edit_gymtopia_story] => 1
[read_private_stories] => 1

A Gym user can create a Story draft ok. However, the Gym user is unable to view his own story draft posts. I'd thought that [read_private_posts] => read_private_stories capability would work.. Instead I'm getting 404 page not found.

I would really appreciate any tips and help, I don't know what I'm missing.

Many thanks, Dasha

share|improve this question
The user needs edit_posts to see drafts. Have you assgned that cap too? – toscho Apr 22 '13 at 14:04
@toscho, to confirm, does a Gym user needs both capabilities: edit_posts and read_private_stories? I find Codex page of capabilities a bit hard to read and understand completely :( – dashaluna Apr 22 '13 at 16:03
private is similar to publish. This status is always a source of confusion. :) See this example for manually assigned custom capability and access restrictions. – toscho Apr 22 '13 at 16:10

Your Answer


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

Browse other questions tagged or ask your own question.