Refer to Term ID from $content field I'm attempting to get the taxonomy term id from a field in the node template for a content type. I'm currently rendering the names of the terms using this

render($content['field_tags'][value]);


This works fine for grabbing the names of the terms. However I would like to be able to grab the actual term ids from those fields instead of just the names. Using devel I do see that that information exists, however I'm not sure how to refer to it.
Updating the Answer:You can use template_preprocess_node. in your theme template.php

function YourTheme_preprocess_node(&amp;$variables) {
  $variables['tags_tids'] = array();
  foreach ($$variables['field_tags'] as $key =&gt; $tag) {
    $variables['tags_tids'] = $tag['tid'];
  }
}


then in your node.tpl you could loop through the "$tags_tids"array, and do whatever you want.