How to get the taxonomy values of a custom post type
assume: I register a taxonomy with custom post type name publication_category.
On your custom post type template write :
$terms = get_the_terms( $post->ID, 'publication_category' );
if ($terms) {
foreach($terms as $term) {
echo $term->name;
}
}
Have you tried using <?php get_taxonomies() ?>
?
If your looking for specific taxonomies that function has optional arguments you can pass in to control the output. See documentation here : http://codex.wordpress.org/Function_Reference/get_taxonomies
Check this function: wp_get_post_terms()
Assuming your custom post type Case Study supports two taxonomies called country and subject, you can try something like this:
<?php $terms = wp_get_post_terms( $query->post->ID, array( 'country', 'subject' ) ); ?>
<?php foreach ( $terms as $term ) : ?>
<p><?php echo $term->taxonomy; ?>: <?php echo $term->name; ?></p>
<?php endforeach; ?>
Your output would be something like:
Country: United Kingdom
Subject: Biology
Subject: Chemistry
Subject: Neurology