I’ve got a custom post type called ‘lawyer’ with a taxonomy called ‘city_taxonomy’,
I’m trying to display a list of jobs with a certain tax term [city 1] with (11) , and have acf multi select field his name [service-type] have items (item1, item2 , item3, item4)
i want to display posts with term 10 and select value item2 ,item3
<?php
$args = array(
‘post_type’ => ‘lawyer’,
‘posts_per_page’ => -1,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘city_taxonomy’,
‘field’ => ‘id’,
‘terms’ => 11,
),
),
‘meta_query’ => array(
‘relation’ => ‘AND’,
array(
‘key’ => ‘service-type’,
‘value’ => array(‘item2′,’item3’),
‘compare’ => ‘IN’,
),
),
);
print_r($args);
$loop = new WP_Query($args);
if ($loop->have_posts()) : ?>
<?php while ($loop->have_posts()) : $loop->the_post(); ?>
<?php the_title(); ?>
<?php endwhile; endif; ?>