Event categories are terms in a custom taxonomy, ‘event-category’, so you should use get_terms
instead:
//Args for which terms to retrieve
$args = array('type'=> 'post', 'order' => 'ASC', 'hide_empty' => 1 );
//Array of taxonomies from which to collect the terms
$taxonomies = array('event-category');
//Get the terms
$terms = get_terms( $taxonomies, $args);
//loop through the terms and display
foreach($terms as $term) {
echo '<li><a href="#tabs-content-'.strtolower($term->term_id).'" title="' . sprintf( __( "View all posts in %s" ), $term->name ) . '" ' . '>' . $term->name.'</a></li>';
array_push($cat_list,"$term->term_id");
}
If you want to get terms for both the ‘category’ and ‘event-category’ taxonomy then you can add ‘category’ to the $taxonomies
array.
Related Posts:
- Short code for Venues
- Calendar Solution: Handling upcoming Dates with Posts?
- Events Plugin that works with existing categories?
- How to use template field in the Event Organiser plugin widget
- Way to force media uploader use custom image size
- Restrict access and display for categories
- Plugin for changing a post’s category based on it’s post date?
- Woocommerce category description as subtitle
- Get subcategories with JSON API plugin
- How to display a category list in a mediawiki like way?
- WordPress Plugin for One-Time Event Registration? [closed]
- How to show custom static content at top of each category page?
- Server-side subscribe by email?
- Custom Post Type Plugin not loading category template and loading 404 instead
- Display content from custom post type if match to main post category
- How can i list random post from multiple category?
- My Category is too big on the Menu what can i do?
- Getting a List of Categories for Use in a Plugin?
- WordPress category add image field
- Events Made Easy Plugin – Duplicate Title Tags
- scrolltop always 0, can’t trigger script
- WordPress JSON API remove posts from a specific category
- Easy Digital Download Sub category
- Solutions to repost categories into multisite blogs?
- Assign post format to categories
- Using WP Category Lists Plugin to Dynamically Display Category (PHP)
- Excluding a category from wp_query breaks recent post widget
- Trouble with editing template for “List category posts” plugin
- Any built-in function to associate a post to category through a plugin?
- What plugin should I use for booking events and receiving payments? [closed]
- Calling plugin function inside custom plugin for onclick event
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Search for categories
- Redirecting thousands of posts that currently have no category in their permalink when changing permalink structure to include category
- Customize permalink wordpress category id
- Automatically Assign Author to Category [closed]
- polylang + category/tag custom language link
- How to display taxonomy images with wp_list_categories?
- Trying to create a table/list of my EventBrite course listings [closed]
- WordPress “Categories to tags converter” not working. Pointing to import.php instead
- How do I apply style to each category of a list?
- How to reorder and display a feed to be chronological?
- How do I rename a category in the menu bar only?
- Ambrosite Next/Previous Post Link Plus or WP next_post_link to cycle through top level category
- Is changing post from category in a large blog a good practice?
- Best/Correct way to add an option to a category
- How to set category correctly for a custom post created by a remote API call?
- .php file for woocommerce edit category? [closed]
- Mutliple users editing single document in wordspress
- How to add category and subcategory in WordPress custom code?
- WooCommerce Hiding A Certain Category From Being Displayed On Single Product
- How can recognize post’s category?
- How can i listing current category and Featured Category post list?
- Categories from front-end, checkbox selection doesn’t work
- Calendar for irregular recurring events [closed]
- How to get Recent Post From Each Category with Thumbnail?
- Plugin to display weekly schedule that can be edited via admin panel
- Category “same post” retreive and display
- Add a new category for posts
- how to show all posts of each category in pages
- Custom Post Type same name as Category
- Display posts by alphabetical order
- How to display the category name in the tab and post inside the tab in WordPress?
- How to display category list with category featured image
- Getting the same post on my related post
- Precheck fields when I add a new post
- automatically set random featured image by category in wordpress on post
- How To Remove “All, Publish, Draft and Expired” in Events Dashboard
- how can I edit the HTML of yith ajax product filter
- WordPress Categories as a Grid
- How to allow editors to only edit certain categories?
- Category as Subdomain for One WP Install
- Woocommerce categories displayed on every category and shopping page
- woocommerce product search based only title
- Sub Categories in drop down menu
- How to populate a Mailchimp newsletter with latest events from WordPress plugin EventOn?
- Related post based on 2 categories
- How to insert category name above post title in a featured pages plugin?
- WordPress Categories from Plugin
- Show all posts of all categories but excluding a category on custom blog page with pagination of my theme
- Showpost and last
- Is it possible to setup Category wise Subsciption?
- Filter EVERY category link with my plugin
- Category archive in menu
- CSV file header
- Find And Add Category to Posts
- Retrieve post thumbnails
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- Editing “Kahi’s Highlight Used Categories” plugin code – highlighting parent and child category in post page
- Display static pages instead of category, in code
- wp_insert_post_data filter to set category
- 404 not found problem with URL rewrite custom category
- Automatically set posts to NoIndex depending on category?
- Make a Custom template for a specific category in wordpress
- formatting the way posts show up
- woocommerce retriving category name as div class?
- query_vars in plugin when using custom permalinks
- How to pre-set WordPress settings for specific posts?
- hide particular category post from front page only [closed]
- How to write a plugin that “listens” every time, an edit occurs?