WP Query using tax_query & meta_query

Question

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(
        array(
            'key'       =>  'type',
            'value'     =>  'Archived Event',
            'compare'   =>  'LIKE'
        )
    ),
    'tax_query' =>  array(
        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

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

Leave an answer

Browse
Browse