0

How can I print the taxonomy term name in node.tpl.php?

The following prints the name as a link, but I just want to print the name as text so I can make it a <div> class.

<?php print $terms ?>
2
$term = current($node->taxonomy);
echo '<div class="some-class">' . $term->name . '</div>';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.