<?php
$post = get_post( $post->ID );
// get post type by post
$post_type = $post->post_type;
// get post type taxonomies
$taxonomies = get_object_taxonomies( $post_type, ‘objects’ );
$out = array();
foreach ( $taxonomies as $taxonomy_slug => $taxonomy ){
// get the terms related to post
$terms = get_the_terms( $post->ID, $taxonomy_slug );
if ( !empty( $terms ) ) {
$out[] = “<b>” . $taxonomy->label . “</b>: “;
foreach ( $terms as $term ) {
$out[] = $term->name.”, “;
}
$out[] = “<br>”;
}
$out[] = “\n”;
}
echo implode(”, $out );
?>