WP Query to get all posts (including in draft/pending review)

You can add post_status to your query, the string ‘any’ will return all posts no matter the status, or you can use an array to just grab those you want.

$args = array(
              'post_type' => 'post',
              'orderby'   => 'title',
              'order'     => 'ASC',
              'post_status' => 'any',
              'posts_per_page' => 10,
            );

http://codex.wordpress.org/Class_Reference/WP_Query#Status_Parameters

Leave a Comment