<p> <?php
$terms = wp_get_post_terms ( $post -> ID , 'sublocation' ) ;
if ( $terms ) {
foreach ( $terms as $term ) {
$out[ ] = '<a class="' . $term -> slug . '" href="' . get_term_link ( $term -> slug , 'sublocation' ) . '">' . $term -> name . '</a>' ;
}
echo join ( ', ' , $out ) ;
}
?>
</p>
<p>TYPE OF MUSIC: <?php
$terms = get_the_terms ( $post -> ID , 'music' ) ;
if ( $terms ) {
$out = array ( ) ; // reInitialise
foreach ( $terms as $term ) {
$out[ ] = '<a class="' . $term -> slug . '" href="' . get_term_link ( $term -> slug , 'music' ) . '">' . $term -> name . '</a>' ;
}
echo join ( ', ' , $out ) ;
}
?>
</p>
<p>TYPE OF PUB: <?php
$terms = wp_get_post_terms ( $post -> ID , 'pub' ) ;
if ( ! empty ( $terms ) ) {
$out = array ( ) ; // reInitialise
foreach ( $terms as $term ) {
$out[ ] = '<a class="' . $term -> slug . '" href="' . get_term_link ( $term -> slug , 'pub' ) . '">' . $term -> name . '</a>' ;
}
echo join ( ' ' , $out ) ;
}
?>
</p>