Skip to content

Instantly share code, notes, and snippets.

@caralgar
Created October 21, 2015 15:27
Show Gist options
  • Save caralgar/2bb96e2fd05cbc91acfd to your computer and use it in GitHub Desktop.
Save caralgar/2bb96e2fd05cbc91acfd to your computer and use it in GitHub Desktop.
Cómo obtener el nombre de una taxonomía
<?php
$terms = get_the_terms( $post->ID , 'types' ); // 'types' es el nombre de la taxonomia
if($terms) {
foreach( $terms as $term ) {
echo $term->name.'<br />';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment