Last active
August 29, 2015 14:06
-
-
Save croosen/aa229fda33046df5cf8b to your computer and use it in GitHub Desktop.
WordPress - Show taxonomies / categories of custom post type
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 | |
$customPostTaxonomies = get_object_taxonomies('foo'); | |
if(count($customPostTaxonomies) > 0) | |
{ | |
foreach($customPostTaxonomies as $tax) | |
{ | |
$args = array( | |
'orderby' => 'name', | |
'show_count' => 0, | |
'pad_counts' => 0, | |
'hierarchical' => 1, | |
'taxonomy' => $tax, | |
'title_li' => '' | |
); | |
wp_list_categories( $args ); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment