There is a argument for posts query is post_status
. It’s values are like below-
$args['post_status'] => array( //(string / array) - use post status. Retrieves posts by Post Status, default value i'publish'.
'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).
),
So, you can filter the posts query by using this post_status
. Just add the post_status
to your $args
which you need to pull from post like below-
$args = array(
'post_type' => 'post',
'posts_per_page' => $ppp,
'cat' => $cat,
'offset' => $offset,
'author_name' => $auth,
'post_status' => array( //(string / array) - use post status. Retrieves posts by Post Status, default value i'publish'.
'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).
),
);
Hope that helps.