Community & Support

How can I hide all taxonomy links from under the node ?

How can I do this ? I don't want showing taxonomy under every node.

Comments

Hiding taxonomy terms

If you never want the taxonomy terms to show you can edit your node.tpl.php file. You will find a section like

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

Remove that from node.tpl.php and no more terms.

If you only want to do it for a particular content type (or types), say page, you can copy node.tpl.php to node-type.tpl.php (ex: node-page.tpl.php) and remove the print of taxonomy terms from that file.

What do I edit in my node.tpl file

What do I edit in my node.tpl file. My file looks like this:

  <div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
    <?php if ($picture) {
      print
$picture;
    }
?>

    <?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>
    <span class="submitted"><?php print $submitted?></span>
    <span class="taxonomy"><?php print $terms?></span>
    <div class="content"><?php print $content?></div>
    <?php if ($links) { ?><div class="links">&raquo; <?php print $links?></div><?php }; ?>
  </div>

Remove this line...

Remove this line:

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

Thx

Hey nevets,

thanks for the tip. I was searching in the admin menu quite a time now to remove these links and couldn't find a solution.

Hello World!

Thanks, nevets that helped

Thanks, nevets that helped a lot. I was searching this from past few days.

------------
Volvo, Video, Velcro. (I came, I saw, I stuck around.)

For D6?

I looked in my node.tpl.php and the closest I found is:

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

I removed this but the taxonomy was still showing up... the full file reads:

<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?> clear-block">

<?php print $picture ?>

<?php if (!$page): ?>
  <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
<?php endif; ?>

  <div class="meta">
  <?php if ($submitted): ?>
    <span class="submitted"><?php print $submitted ?></span>
  <?php endif; ?>

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

  <div class="content">
    <?php print $content ?>
  </div>

  <?php print $links; ?>
</div>

Any suggestions?

Did u removed ? <?php if

Did u removed ?

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

Is it in a perticular CCK or for all the content types?

-- Sree --
IRC Nick: sreeveturi

All the content... I did not

All the content...

I did not remove the trailing </div> as that would have left an unclosed <div> but I did remove the other three lines...

Tks!

Got it... I had edited the

Got it... I had edited the file in the wrong directory...

Thank you

That is great. I did not need two titles in my page.

Can somebody bring this a

Can somebody bring this a step further? I would like to display taxonomy terms, but only a particular group. Removing all terms was the first step, but how about do I go specifying the terms to display?

How about this