Archive | June 15, 2010

Print taxonomy term in node without link in drupal 6

Put these lines to your node.tpl.php file:

<?php if ($terms): ?>
<?php
$vocabularies = taxonomy_get_vocabularies();
foreach($vocabularies as $vocabulary) {
if ($vocabularies) {
$terms = taxonomy_node_get_terms_by_vocabulary($node, $vocabulary->vid);
if ($terms) {
print '<span class="taxonomy">';
foreach ($terms as $term) {
print $term->name;
}
print '</span>';
}
}
}
?>
<?php endif; ?>

Source: http://drupal.org/node/317172