I am creating a new template that will get all the custom post type (Case Studies) content, including the taxonomies values associated with it.
So far I got the follow
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
Just in case if it could help someone, I used "the_taxonomies()" function inside a loop of a custom post type.
<?php
while ( have_posts() ) : the_post();
$custom_post = get_post_meta( get_the_ID() );
//
?>
//html
//and stuff
<?php the_taxonomies(); ?>
<?php
endwhile;
?>
the result was:
Taxonomy-name: {Taxonomy-term}. <-- as a link
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