I have two post types:
- Venues
- Reviews
The Venues Post Type contains the following ACF custom fields:
- Region
- Sub Region
The Reviews Post Type contains one ACF custom field:
- Venue (which is Post Object - Select Field)
I need to display all Reviews who's Venue is in a specific region and/or Sub Region.
Is this something that can be accomplished using WP_Query? Or do I need to do a fancy database call?
This is what I thought would initially work but it seems that you can not get the custom field of a post object as a meta_query..
$args = array(
'post_type' => 'review',
'posts_per_page' => 18,
'paged' => $paged,
'meta_key' => 'venue',
'meta_query' => array(
array(
'key' => 'region',
'value' => 'napa-valley'
)
)
);