Created
September 9, 2018 03:31
-
-
Save tradesouthwest/65b077ce83fbe815909d4d61e55e04d8 to your computer and use it in GitHub Desktop.
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
/** | |
* print custom post type category list | |
* @cpt name= hordes | |
* @taxonomy name= hordes-category | |
*/ | |
if ( ! function_exists( 'theme_entry_footer_cat_list' ) ) : | |
function theme_entry_footer_cat_list() { | |
// Get custom taxonomy project_category for each specific CPT | |
if ( 'hordes' === get_post_type() ) { | |
echo '<span class="cat-links">'; | |
echo get_the_term_list( $post->ID, 'hordes-category', '', ', ' ); | |
echo '</span>'; | |
} | |
} | |
endif; | |
/** | |
* Or just add inline | |
*/ | |
<footer class="hrds-meta_footer"> | |
<ul class="hrds-list-inline"> | |
<li><span class="hrds-tagcats"><?php echo get_the_term_list( $post->ID, 'hordes-category', '', ', ' ); ?> | |
<em class="hrds-author"><?php the_author(); ?></em> <time><?php the_date(); ?></time></li> | |
</ul> | |
</footer> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.lockedownseo.com/taxonomies-list-custom-post-type-by-post-id/