Created
July 15, 2015 21:09
-
-
Save brunomonteiro3/f7b1437e50d439c609d6 to your computer and use it in GitHub Desktop.
This code will list all the terms from a taxonomy that are associated with a post. Must be inside a loop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$yourTaxonomySlugHere = get_the_terms($post->ID, 'yourTaxonomySlugHere'); | |
if ($terms) : | |
foreach ($terms as $term) : | |
echo $term->name; | |
endforeach; | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Foda.