Display list of all event categories

Home Forums Calendar Products Events Calendar PRO Display list of all event categories

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #67944
    Andrew
    Participant

    This feels like an easy one, but I’m just trying to output the list of categories for ECP/EC. I’ve looked around, but can’t seem to find the details. Is there a simple function for that, or a query I can use? Ideally I’m looking for a way to do it outside of the loop as it’s kind of a sub-menu, but it would be helpful to also have the function. Thanks for any help!

    #67945
    Andrew
    Participant

    Actually, I’m also curious how to list the venues as well, so again I’m looking for the function and a query for outside the loop. Thanks again!

    #68120
    Barry
    Member

    Hi Andrew!

    Regarding a list of all event categories have you taken a look at WordPress’s get_terms() function? Basic example:

    $terms = get_terms(TribeEvents::TAXONOMY, array('hide_empty' => 0));

    To list venues, you could use one of our own functions – tribe_get_venues(), a straightforward example being:

    $venues = tribe_get_venues();

    You could then loop through the resulting array and display them/link to them in whatever fashion you desire – hope that helps 🙂

    #981169
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Display list of all event categories’ is closed to new replies.