Reputation: 38805
I have a term product
with term id 123
.
How can I use the term id 123
to get the term name?
Upvotes: 0
Views: 4568
Reputation: 3351
place this function in template file
function getTermsName($taxnomyid){
$terms = taxonomy_get_term($taxnomyid);
$termsname = $terms->name;
return $termsname;
}
and use <?php echo getTermsName($taxnomyid); ?>
to print term name wherever you want
$taxonomyid
is your term id
Upvotes: 0
Reputation: 54939
http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/function/taxonomy_get_term/5
Upvotes: 1