Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - Events
- -- Location
- -- Date
- - Region
- -- State
- -- StateCode
- $terms = get_terms( array(
- 'taxonomy' => 'events_category',
- 'hide_empty' => false,
- ) );
- foreach ($terms as $term) {
- if ($term->parent != 0) { // avoid parent categories
- $options[] = array('label' => $term->name, 'value' => $term->term_id, 'id' => $term->term_id);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement