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 want to make it so anyone logged in can view their own posts if draft or pending via the URL ?p=post_ID&preview=true. What is the best way to do this?

share|improve this question
You can use: <?php get_author_posts_url( $author_id, $author_nicename ); ?> on codex.wordpress.org/Function_Reference/get_author_posts_url to get author own posts. – Foxsk8 Feb 2 '14 at 20:52
This outputs the link. I have this, but I need to know how a subscriber can view that post preview. What capability handles this? – manc Feb 2 '14 at 21:12
Do you want to show all pending posts for an current user or one specific post (providing the id via url)? – gmazzap Feb 2 '14 at 21:45
One specific post. I have the list already and have a preview link, however, only editors and admins can see the preview. I want to know the specific capability is needed to view a post preview. – manc Feb 2 '14 at 22:32

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.