Skip to content

Instantly share code, notes, and snippets.

@jpcontrerasv
Last active September 25, 2015 15:23
Show Gist options
  • Save jpcontrerasv/f21601161dc4a1172bcf to your computer and use it in GitHub Desktop.
Save jpcontrerasv/f21601161dc4a1172bcf to your computer and use it in GitHub Desktop.
WP > Term Name
$terms = get_the_terms( $post->ID , 'categorias' );
if($terms) {
foreach( $terms as $term ) {
echo $terminowp = $term->name;
}
}
$terms = get_the_terms( $post->ID , 'etiquetas' );
foreach ( $terms as $term ) {
$term_link = get_term_link( $term, 'etiquetas' );
echo "<a href='".$term_link."'>" . $term->name . "</a>&nbsp;";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment