How do I hide the taxonomy links that appear just below the title of my content? I'd like to hide them in only some situations...

Am I gonna have to write my own module? I'd rather find a quicker solution! Thanks.

Comments

venkat-rk’s picture

The brute force method is to remove the print terms function from your theme's page.tpl.php file. But they will be gone in all situations.

I suspect there are more elegant solutions.

Edit: Oops, as mentioned in the thread below, it should be your node.tpl.php file, not page.tpl.php file.

xDreamer’s picture

In your theme directory open node.tpl.php.

Look for this bit of code:

<span class="taxonomy"><?php print $terms?></span>

and just comment it out so that it appears like this:

<!-- span class="taxonomy"><?php print $terms?></span -->

This method will keep the original code as it is, but it will just make the taxonomy disappear from the screen. You can always delete it if you want to remove it permenantly, but I'd advise you to comment it out.

Martin Haanz’s picture

Ah, yes. I forgot about the PHPtemplate stuff.

How about if I use PHP to check for a particular condition in node.tpl.php before printing out the terms? I guess I could check the section name found in my clean URL? Or maybe there's an easier, more elegant way? Thanks.

gumnaam1’s picture

There is a module called taxonomy_hide which enable you to do just what you are asking for.
Hide certain taxonomy terms.