apamphilon

Get taxonomy term ID

<?php 
    global $post;
    $terms = get_the_terms($post->id, 'TAXONOMY');

    if (!empty($terms)) {
        $termID = $terms[0]->term_id;
        echo $termID;
    }
?>

Comments: