Change WordPress user roles and capabilities Forums How to or FAQ Event Calendar Pro Access for Role but nothing showing in Drafts or Trash Reply To: Event Calendar Pro Access for Role but nothing showing in Drafts or Trash

#7439
Vladimir
Keymaster

Erik,

You use custom code to retrieve posts via WordPress API function get_posts() and does not include post_status argument to the arguments list. Function get_posts() uses ‘publish’ value for this argument as a default one in this case, line #2133:

get_posts()

So if you wish to make available records with ‘draft’ status too, you have to execute the separate query with ‘post_status’=>’draft’ argument added and concatenate the result of both queries.