By Martin Haanz on
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.
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
The brute force method is to
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.
How about commenting out the code in node.tpl.php
In your theme directory open node.tpl.php.
Look for this bit of code:
and just comment it out so that it appears like this:
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.
What about checking for a condition in node.tpl.php?
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.
taxonomy_hide module
There is a module called taxonomy_hide which enable you to do just what you are asking for.
Hide certain taxonomy terms.