Hi,
i have a taxonomy field and return value is set to “term object”.
I want to get the ID term but the code below no works.
$termine = get_field('scrittore');
$termine_id = $termine->id;
$terms = get_terms( array(
'taxonomy' => 'pa_scrittore',
'number' => 10,
'orderby' => 'count',
'order' => 'DESC',
'exclude' => $termine_id,
'hide_empty' => false,
) );
foreach ( $terms as $term ) {
//do stuff
}
Thanks
You may use $termine->term_id