cmb2-taxonomy icon indicating copy to clipboard operation
cmb2-taxonomy copied to clipboard

Is there a way to use get_terms and filter by custom taxonomy field?

Open jonben opened this issue 9 years ago • 0 comments

Is there a way to use get_terms and filter by custom taxonomy field?

Something like that :

$args = array(
        'hide_empty' => false,
        'meta_query' => 
            array(
                'key' => 'segment',
                'value' => 'chemicals',
                'compare'   => 'LIKE'
            )
    );
$product_groups = get_terms('product_group', $args);

jonben avatar Feb 25 '16 02:02 jonben