You can use get_term_by
to retrieve a term by its ID:
$term_id = 123;
$term = get_term_by( 'id', $term_id, 'location' );
if( $term ){
echo $term->name;
}
You can use get_term_by
to retrieve a term by its ID:
$term_id = 123;
$term = get_term_by( 'id', $term_id, 'location' );
if( $term ){
echo $term->name;
}