Hello,
I am trying to extract categories associated to events with tribe_get_event_categories like this:
$event_id = get_the_ID();
print_r (tribe_get_event_categories($event_id)) ;
doing so I get :
“Events Category:
. Myfirsteventscategorie
. Mysecondevntcategorie”
but as I would like only the first one
i was trying with :
$event_id = get_the_ID();
$myCat = (tribe_get_event_categories($event_id)) ;
echo $myCat [0]->name;
but it doesn’t work. Does it means that tribe_get_event_categories do not return an array ? Please, any help ? Thanks