As documented you can set the post_status
argument to 'any'
to retrive
…any status except those from post statuses with ‘exclude_from_search’ set to true (i.e. trash and auto-draft).
So:
$args['post_status'] = 'any';
As documented you can set the post_status
argument to 'any'
to retrive
…any status except those from post statuses with ‘exclude_from_search’ set to true (i.e. trash and auto-draft).
So:
$args['post_status'] = 'any';