Skip to content

Instantly share code, notes, and snippets.

@MZAWeb
Created Aug 2, 2012
Embed
What would you like to do?
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