<?php
global $post;
$terms = get_the_terms($post->id, 'TAXONOMY');
if (!empty($terms)) {
$termID = $terms[0]->term_id;
echo $termID;
}
?>
<?php
global $post;
$terms = get_the_terms($post->id, 'TAXONOMY');
if (!empty($terms)) {
$termID = $terms[0]->term_id;
echo $termID;
}
?>
Comments: