i am creating a frontend dashboard where i need to show all the post by the current user. So i need to show posts with all post status. Mainly published, trashed and the pending. I am now using simple query post but it is returning only the published posts as expected.
$query = array(
'post_type' => 'my-post-type',
'post_author' => $current_user->ID
);
query_posts($query);
Can anyone help what i need do extra?
post_statusparameter, ie.'post_status' => 'any'? – t31os Mar 30 '11 at 13:50WP_Querypre_get_postsorget_postsinstead ofquery_posts. Never usequery_posts– Tom J Nowell Apr 16 at 12:45