简体   繁体   中英

Display taxonomy terms for current post only (Drupal)

I have many snippets to show all taxonomy terms. However, I want to be able to list all taxonomy terms for the current post that you're readying (with links behind them to see more posts tagged with that same term).

Any ideas?

Most drupal stock templates show the nodes terms in the node display by default, if you're not seeing them perhaps your template doesn't expose them in your node.tpl.php like so:

<?php if ($taxonomy): ?>  
 <div class="terms"><?php print $terms ?></div>  
<?php endif;?>  

OR...

You may be using views with field display/row style and need to add the taxonomy terms as a field

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM