Skip to content

Instantly share code, notes, and snippets.

@barbwiredmedia
Created May 6, 2014 21:35
Show Gist options
  • Save barbwiredmedia/84dc699981ba90150bde to your computer and use it in GitHub Desktop.
Save barbwiredmedia/84dc699981ba90150bde to your computer and use it in GitHub Desktop.
In the loop: list the terms from the current post http://codex.wordpress.org/Function_Reference/wp_get_object_terms#Examples
<?php $item_terms = wp_get_object_terms($post->ID, 'your_taxonomy_name');
if(!empty($item_terms)){
if(!is_wp_error( $item_terms )){
foreach($item_terms as $term){
echo '<h2>'.$term->name.'</h2>';
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment