Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Event Categories (Display)
- *
- * Display the event categories
- *
- * @param string $label
- * @param string $separator
- * @uses the_terms()
- * @since 2.0
- */
- function tribe_meta_event_cats( $label=null, $separator=', ') {
- if( !$label ) { $label = __('Category:', 'tribe-events-calendar'); }
- $tribe_ecp = TribeEvents::instance();
- //the_terms( get_the_ID(), $tribe_ecp->get_event_taxonomy(), '<dt>'.$label.'</dt><dd>', $separator, '</dd>' );
- $args = array( 'orderby' => 'slug' );
- $terms = get_terms($tribe_ecp->get_event_taxonomy(), $args);
- $count = count($terms); $i=0;
- if ($count > 0) {
- echo '<dt>' . $label . '</dt>';
- echo '<dd>';
- foreach ($terms as $term) {
- $i++;
- $term_list .= '<a href="/calendar/category/' . $term->slug . '" title="' . sprintf(__('View all post filed under %s', 'my_localization_domain'), $term->name) . '" class="' . $term->slug . '">' . $term->name . '</a>, ';
- }
- echo $term_list;
- echo '</dd>';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement