Skip to content

Instantly share code, notes, and snippets.

@MZAWeb
Created August 2, 2012 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MZAWeb/3232646 to your computer and use it in GitHub Desktop.
Save MZAWeb/3232646 to your computer and use it in GitHub Desktop.
my_tribe_meta_event_cats (list without link)
<?php
function my_tribe_meta_event_cats() {
$tribe_ecp = TribeEvents::instance();
$terms = get_the_terms( get_the_ID(), $tribe_ecp->get_event_taxonomy() );
if ( $terms ) {
$term_names = wp_list_pluck( $terms, 'name' );
$label = "Category";
if ( count( $term_names ) > 1 ) {
$label = "Categories";
}
echo sprintf( '<dt class="category-label">%s:</dt><dd class="category-meta">%s</dd>', $label, join( ", ", $term_names ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment