Using print render($content['taxonomy']); in node.tpl.php I am having trouble getting my taxonomy terms printed into the containing  of my node.tpl.php file. I have named my taxonomy terms for a custom block (books) as     field_tags and I want them to get printed after the $classes array as plain text CSS classes.

Here is the offending line:

&lt;div id="node-&lt;?php print $node-&gt;nid; ?&gt;" class="&lt;?php print $classes; ?&gt;&lt;?php print $content['field_tags']; ?&gt; clearfix"&lt;?php print $attributes; ?&gt;&gt;


The goal here is to have a menu on top of this view of books that can select individual titles based on their individual taxonomy terms. Open to suggestions about that as well if you think this plan is stupid.
I think the proper way to do this would be to implement THEME_preprocess_HOOK() in your theme's template.php.  

In that function, just add each taxonomy term name into the classes array.  You'll probably also want to cleanse the term names as you put them into the classes array, dig around Pathauto or Transliteration modules to find a function to do the dirty work.

function mytheme_preprocess_node(&amp;$vars) {
    foreach ($vars['node']-&gt;field_my_taxonomy_field[LANGUAGE_NONE] as $term) {
        $vars['classes_array'][] = pathauto_cleanstring($term-&gt;name);
    }
}