Skip to content

Instantly share code, notes, and snippets.

@shawnsandy
Created November 27, 2011 21:00
Show Gist options
  • Save shawnsandy/1398142 to your computer and use it in GitHub Desktop.
Save shawnsandy/1398142 to your computer and use it in GitHub Desktop.
Get a list of taxonomies (term) by name
<ul>
<?php
$terms = get_the_terms($post->ID, 'design');
if ($terms && !is_wp_error($terms)) :
$draught_links = array();
foreach ($terms as $term) {
echo "<li><strong>{$term->name}</strong> - {$term->description}</li>";
}
endif;
?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment