Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have recently upgraded from 2.9.2 to 3.3.1. Im using the edit flow plugin to assign different status to posts and allowing users to register and create a post with a specific status. In the previous version, users could VIEW their posts as long as they were the author. In the new version of WP, this is not the case - they see a 404 page. I dont think this is an edit flow problem but a feature of the new WP.

How does one allow users(subscribers) to view ANY post status provided they are logged in?

share|improve this question
add comment

1 Answer 1

You must write a small plugin for the Hook pre_get_posts; an example:

add_action( 'pre_get_posts', 'fb_allow_draft' );

function fb_allow_draft( $query_obj ) {
    // only on admin screen use this filter
    if( ! is_admin() )
        return;

    // change our query object to include any post status
    $query_obj->query_vars['post_status'] = 'any';
}

If you will specific this new loop for an rights object from an role, use the small question: if ( ! current_user_can( 'read' ) ) return;

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.