September 26, 2018
The Post Object field in ACF grabs all Post Statuses in the WordPress backend, but does not provide filtering within the plugin’s interface to select only Published Post items.
ACF has instructions to setup a query filter here, and there is discussion on the ACF website about how to use this method to filter by Post Status.
However, for the life of me, I could not get this to work … so I took my own approach using get_post_status():
$post_object = get_field('custom_field'); $foreach($post_object as $post) { if(get_post_status($post->ID) == 'publish') { // check for published posts echo $post_object; } }