Welcome to the Geeks & God Static Archive. Read more »

hide taxonomy info on content node

Joined: 12/05/2007

ok this is probably a silly question, but I can't find a way to shut it off anywhere.
I've added taxonomy terms (via a new field) for a content type, but I don't want it to display when viewing the content node, I only need the taxonomy terms to create specific views.

I can hide it using CSS, but there's got to be a way to turn off the display. When I go to the content type "manage fields" it is gray'd out.

thanks

G&G Podcast Host
Rob Feature's picture
Joined: 06/01/2006
node.tpl.php

If you have a node.tpl.php (or a node-[content-type].tpl.php) in your theme folder, go in there and delete the part that says <?php print $terms ?> and anything around it. That will remove the taxonomy from printing.

-Rob Feature
Geeks and God Co-Host
www.mustardseedmedia.com

OrSteve
OrSteve's picture
print a single taxonomy term

Is there a way to print a single taxonomy term? I'm using

<?php
print $terms
?>
, but this displays all the taxonomy terms I have associated with a piece of content. How do I print just one.
Thanks

Joined: 12/12/2008
I don't know exactly how to

I don't know exactly how to do it but to find this out you can add the line:<pre><?php print_r($node) ?></pre> to your node.tpl.php or whatever u are using at that point. And it shows u everything there is in your node.

And I'm nearly sure that there's an array somewhere with all your terms inside from which you can print what you want.

Perhaps Robs Videocast helps you to get the idea: Theming a drupal blog

muli

church: http://hlfamilie.de || youth-site of my church (made with drupal): http://lichtblick-bochum.de || blog: http://fjord.mrmuli.de

Joined: 09/09/2008
Taxonomy Hide

Here's a much simpler, and arguably better way: Use the Taxonomy Hide Module.

Good luck,
Curt