Support

Account

Home Forums Backend Issues (wp-admin) Exclude Drafts from Post Object field Reply To: Exclude Drafts from Post Object field

  • // hide drafts
    function relationship_options_filter($options, $field, $the_post) {
    $options[‘post_status’] = array(‘publish’);
    return $options;
    }
    add_filter(‘acf/fields/post_object/query/name=<YOUR FIELD NAME>’, ‘relationship_options_filter’, 10, 3);