Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By Etc. Incarnate on
Taxonomy terms are always listed at the bottom of the nodes I make, (as a link that category) - However, I don't want them to be there, as it adds another thing to the page and distracts from the content of the node.
How can I remove them from the bottom like that?
Thanks!
Comments
*bumps* =)
*bumps* =)
CSS method (hide only)
I know this is old, but for anyone who cares, if you just want to hide the terms you can add this line to your CSS file of a Zen-based theme (and probably other themes as well)...
CSS method
Turning of display of class field-type-taxonomy-term-reference removes the taxonomy reference terms at the end of posts.
.field-type-taxonomy-term-reference {
display: none;
}
Hack node.tpl.php to remove taxonomy links
Or so I'm told: In your theme's node.tpl.php file, find and remove
print $terms
(Or don't remove it; you might want it back later. Safer to just comment it out.)
Does anybody know some other method?
--------
A site by, of, and for the Drupal newbie: http://www.drupalace.com
Really?
*blinks* Honestly? Its that simple?
*goes to try it out*
No luck. Commented it out
No luck.
Commented it out as suggested, and uploaded to site again. But when I view the nodes, still the same thing.
Is there something I have to to do refresh/bring it to drupals attention? I don't have caching enabled, so thats not it...
Thanks.
Oops! My mistake - I was
Oops!
My mistake - I was putting it in the wrong theme folder. Problem solved, thanks! =D
One other question - I will eventually have another content type that I would like to have the taxonomy links at the bottom - Is there a way to make node.tpl's specific to a certain content type?
Thanks!
You can make specific
You can make specific templates for different content types simply by putting the content type name in the filename of the node template, like node-contenttype.tpl.php
more info here: http://drupal.org/node/17565
You can also switch by the
You can also switch by the value of $node->type within the template file, if using several templates is overkill.
Thanks
Thanks
Same problems here
I am having the same problems :(
can anyone kindly answer?
thanks a LOT
Contemplate
Can this be done with Contemplate?
Didn't work for me
I've just tried, but it doesn't work for me. Even when I delete the body in the template, the last line was still there.
what to look for
This is a pretty standard node.tpl.php page (this one is from Bluemarine, Drupal 5)
To delete taxonomy and links from all node just delete:
and
To just hide them from being seen by the browser and keeping them in your php file surround the code you want hidden with theses
<!--
your code-->
Hope this helps
-Nick
remove specific taxonomy vocabulary/term
you can also remove a specific vocabulary/term link with theme overrides
and check out this module Taxonomy Hide:
http://drupal.org/project/taxonomy_hide
Thanks for the tip!
It works just perfectly, hiding the vocabulary terms in node views, either by vocabulary or by node type.
Removing Terms in Node Views Drupal 7
I put some custom code in a node--custom_content_type.tpl.php file to provide a graphic "back button" to the bottom of the node view which links back to the view from which you just came. When you clicked the taxonomy term link, it provided an html list of all content types with that term. The last item in each listing of custom_content_type was a graphic "back button", yuck!
Since I didn't have any use for the taxomony link, at least not that I can think of right now, I used this CSS code to hide it in Drupal 7;
I don't think these classes are unique to my theme, which is a sub-theme of adaptivethemes. I just used Firefox's Firebug plugin to find the appropriate classes.
Drupal 7...
In Drupal 7, you should do it this way:
"Admin/Structure/Content Type/Manage Display/"
Here you can control the visibility of BOTH the label and links.
FYI I could not find where term links are rendered in either page.tpl.php or node.tpl.php... I think it occurs in a deeper file.
Also, I really disagree with using CSS hiding as a solution.
I totally agree, just facing
I totally agree, just facing the same problem to try to switch off the output of the taxonomy terms (because I relocated the output of them to another place in the display). An simple unset() is not possible. Maybe in the future there is an way to control this inside a hook? For now I use the crappy CSS solution.
Huh? You are responding to a post that says...
In D7 it's easy to control the display. Just go to your content type "display" and set the label and display "format" for your term reference field(s) to "
<hidden>
". It's very simple. And you can do that just for teasers, for full nodes, or for RSS feeds, etc.See you at the Drupalcon!
I have a field field_category
I have a field field_category which is a taxonomy term.
To hide it from showing just hide it before the render($content) is called: