WP Query using tax_query & meta_query


I have a custom post type called events.

I have a custom taxonomy called issueEvent.

I have several ACF fields on the taxonomy. The one I have to query by is a checkbox.

I want to query 3 specific taxonomy items via ACF field AND slug. This is what I have so far:

    $a = array(
    'post_type'         =>  'events',
    'relation'          =>  'AND',
    'meta_query'        =>  array(
            'key'       =>  'type',
            'value'     =>  'Archived Event',
            'compare'   =>  'LIKE'
    'tax_query' =>  array(
            'taxonomy'      =>  'issueEvent',
            'field'         =>  'slug',
            'terms'         =>  array('june-2019','april-2019','february-2019'),
            'operator'      =>  'LIKE'
$b = new WP_Query($a);

I have tried both the standard WP Query (see above, loop not included), and get_terms. The current loop as seen above does not show any results within the loop.

I hope this makes sense, I need some guidance. Thank you

, Hewe 4 years 2019-10-22T16:16:16-05:00 0 Answers 80 views 0

Leave an answer