Skip to content

Instantly share code, notes, and snippets.

@jo-snips
Created March 12, 2012 03:21
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save jo-snips/2019513 to your computer and use it in GitHub Desktop.
Save jo-snips/2019513 to your computer and use it in GitHub Desktop.
The Events Calendar: List Event Categories
<?php
$terms = get_terms("tribe_events_cat");
$count = count($terms);
if ( $count > 0 ){
echo '<ul class="events-cat-menu">';
foreach ( $terms as $term ) {
echo '<li class="cat_'. $term->slug .'"><a href="'. get_term_link($term->slug, 'tribe_events_cat') .'">' . $term->name . '</a></li>';
}
echo '</ul>';
}
?>
@revaboogy
Copy link

Thanks for the code. Any ideas at setting parent and child categories in this list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment