Support

Account

Home Forums General Issues Query Posts using meta data from a Post Object field Reply To: Query Posts using meta data from a Post Object field

  • Hi @quirksmode

    This is achievable through the use of the acf/fields/post_object/query filter. You can modify the $args array as follows:

    function my_post_object_query( $args, $field, $post ) {

    $args[‘author’]=$user_id

    return $args;
    }

    add_filter(‘acf/fields/post_object/query/name=my_post_object’, ‘my_post_object_query’, 10, 3);

    For more info you can refer to this article: acf/fields/post_object/query