I want to display my categories in tabs. All is good, except my “Upcoming Events”, created with Event Organiser (awesome plugin at http://wordpress.org/extend/plugins/event-organiser/), are not being treated like a normal category, so they don’t appear. In essence, get_categories() is not returning the events category. How can I fix this display?
$args = array('type'=> 'post', 'order' => 'ASC', 'hide_empty' => 1 );
$categories = get_categories( $args );
foreach($categories as $category) {
echo '<li><a href="#tabs-content-'.strtolower($category->term_id).'" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a></li>';
array_push($cat_list,"$category->term_id");
}
Event categories are terms in a custom taxonomy, ‘event-category’, so you should use
get_terms
instead:If you want to get terms for both the ‘category’ and ‘event-category’ taxonomy then you can add ‘category’ to the
$taxonomies
array.