Created
March 4, 2016 11:37
-
-
Save asha23/c2e0022b204b5f6ac7e9 to your computer and use it in GitHub Desktop.
Get the taxonomy and use it as a title (single taxonomies only)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $post; | |
$trm = get_post_type($post); | |
$taxonomies = get_object_taxonomies($trm); | |
$terms = wp_get_object_terms( $post->ID, $taxonomies[0] ); | |
foreach( $terms as $term ): | |
$term_names[] = $term->name; | |
$stageName = implode($term_names); // you'll need to add an argument here if artists appear on more than one stage | |
endforeach; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment