Hi,
I would like for Private posts to be available to select in the Relationship field. I’ve tried to hook it with the following and although it seems to work (if I change ‘private’ to ‘draft’ it show the draft posts) the private posts just won’t show.
function my_acf_result_query( $args, $field, $post )
{
// eg from https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
$args['post_status'] = 'private';
return $args;
}
// acf/fields/relationship/result - filter for every field
add_filter('acf/fields/relationship/query', 'my_acf_result_query', 10, 3);
Is there any work around for this ?
Thanks,
Fred
Hi @aggelos,
Thanks for the post.
I have just tried this out on my end and the filter is pulling the private posts as expected.
I am however running the latest Pro version 5.3.7.