ACF Post Object – Query by Post Status

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;



Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.