Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
<?php print $node->content['body']['#value']; ?>
does not render in the presence of the following code:
<?php
if ( arg(0) == 'node' && is_numeric(arg(1)) ) {
$node = node_load(arg(1));
$vid = 36;
$terms = taxonomy_node_get_terms_by_vocabulary($node, $vid);
if ($terms) {
print '';
foreach ($terms as $term) {
print ''.l($term->name, 'taxonomy/term/'.$term->tid).'';
}
print '';
}
}
?
This will display terms only from one vocabulary.
What gives?
Is there any other way I could print the term only from one selected vocabulary?
Thank you.
Comments