Support

Account

Home Forums General Issues get_terms() with multiple values Reply To: get_terms() with multiple values

  • UPDATE: For anyone else who encounters this…

    It turns out, the first option DOES work. You can pass an array to a meta_value. HOWEVER, the operator ‘=’ does not work. Changing the compare to ‘IN’ works for my scenario. Final code:

    $people_array = array(73227,970674,17293);
    $args = array(
    	'taxonomy' => 'people',
    	'meta_query' => array(
    		array(
    		  'key'     => 'person_id',
    		  'value'   => $people_array,
    		  'compare' => 'IN'
    		),
    	)
    );
    $people = get_terms( $args );