How to Get All Posts with any post status?
I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in all states, mainly published
, trashed
and the pending
. I am now using a simple query but it is returning only the published posts.
$query = array(
'post_type' = 'my-post-type',
'post_author' = $current_user-ID
);
query_posts($query);
Can anyone help? What else do I need to do?
Topic post-status wp-query query-posts Wordpress
Category Web