• Resolved dgfrench

    (@dgfrench)


    I am using The Events Calendar with The7 theme which utilizes Visual Composer.

    and have been able to construct the following query to take care of only displaying events from today forward:

    post_type=tribe_events&post_status=publish&_EventStartDate=>$today&orderby=_EventStartDate&order=asc

    but how do I specify which event categories are displayed?

    For example, I only want to display events from categories labeled Entertainment and Concerts

    https://wordpress.org/plugins/the-events-calendar/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @dgfrench,

    Thanks for reaching out! I’m not much familiarized with Visual Composer, so not sure about the query you built, but I can tell you about how to query events by category.

    Event Category is a custom taxonomy (tribe_events_cat) and can be queried using a tax query like shown in the docs → https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters

    Hope that helps,
    Best,
    Nico

    Thread Starter dgfrench

    (@dgfrench)

    Thank you Nico!

    I’m still not having any luck with multiple categories but this works just fine:

    post_type=tribe_events&tribe_events_cat=featured&post_status=publish

    How can I pull from ‘featured’ AND ‘entertainment’?

    Hey there! Sorry, this thread must have fallen off our radar!

    You can try using an array to call multiple categories:

    post_type=tribe_events&tribe_events_cat=array(featured, entertainment)&post_status=publish

    Cheers!
    Geoff

    • This reply was modified 7 years, 3 months ago by geoffgraham.
    Thread Starter dgfrench

    (@dgfrench)

    It’s doesn’t work so I’m guessing that Visual Composer requires a different format.

    Does anyone have experience with TEC AND VC?

    Hi @dgfrench,

    Unfortunately we can’t support interactions with other plugins, but we’ll leave this one open for a bit in case of someone in the community who might be able to help. 🙂

    Best,

    Shelby 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom query to get events from multiple categories’ is closed to new replies.