Support

Account

Home Forums General Issues Meta query for post object? Reply To: Meta query for post object?

  • My fields are as follows: authors is a group field and within that I have a subfield of people (amongst other subfields). People is a multiple post_object select field.

    I have the impression from this thread that it is possible to query subfields in this way…

    $images_query = new WP_Query([
        'posts_per_page' => -1,
        'post_type' => 'images',
        'meta_query' => [
            [
                'key' => 'authors_%_people',
                'value' => ['85'],
                'compare' => 'IN'
            ],
        ],
    ]);

    It is not working, please could you advise me.