Displaying the category name of a custom post type

So this is what I needed:

<?php
$terms = get_the_terms( $post->ID , 'board' );
foreach ( $terms as $term ) {
echo $term->name;
}
?>

Leave a Comment