Created
March 12, 2012 03:21
-
-
Save jo-snips/2019513 to your computer and use it in GitHub Desktop.
The Events Calendar: List Event Categories
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
<?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>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the code. Any ideas at setting parent and child categories in this list?