/ Published in: XHTML
These instructions were written for a genesis subtheme but should work for any theme.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Add the following preprocess function to your theme template.php. If you already have this function, then just add the highlighted line. function genesis_custom_preprocess_node(&$vars, $hook) { $vars['terms_split'] = genesis_custom_split_terms($vars['node']); } // Add the following function to the bottom of your theme template.php // Split out taxonomy terms by vocabulary function genesis_custom_split_terms($node) { $vocabularies = taxonomy_get_vocabularies(); foreach($vocabularies as $vocabulary) { $terms = taxonomy_node_get_terms_by_vocabulary($node->nid, $vocabulary->vid); if ($terms) { $links = array(); foreach ($terms as $term) { $links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => strip_tags($term->description))); } } } return theme('item_list', $items, NULL, 'ul'); } // Finally, in your node.tpl.php add the following line wherever you want the new split terms: <?php print $split_terms ?>