How can a guest view the “Pending Review” Post?

  1. When a user creates a new post it will have “pending” status. So I want the visitor (guest – not logged user) to be able to view “Pending” posts and vote it to “Publish” if enough “X Votes”. Google bot can also crawl “Pending” Posts.

  2. I want to use permalink for “Pending” Post.

    Read More

How can I do this?

Please help me! Thanks all friends!

Related posts

2 comments

  1. For displaying “Pending” post to the users you can add “post_status” parameter to get_post() or wp_query function like

    post_status (string / array) – use post status. Retrieves posts by Post Status. Default value is ‘publish’, but if the user is logged in, ‘private’ is added. And if the query is run in an admin context (administration area or AJAX call), protected statuses are added too. By default protected statuses are ‘future’, ‘draft’ and ‘pending’.

    'publish' - a published post or page.
    
    'pending' - post is pending review.
    
    'draft' - a post in draft status.
    
    'auto-draft' - a newly created post, with no content.
    
    'future' - a post to publish in the future.
    
    'private' - not visible to users who are not logged in.
    
    'inherit' - a revision. see get_children.
    
    'trash' - post is in trashbin (available with Version 2.9).
    
    'any' - retrieves any status except those from post types with 'exclude_from_search' set to true.
    

    Or you can check the wordpress codex for other help.

Comments are closed.