Display lists of events dynamically.
Similar to other dynamic content, you query the events calendar to display a list of events anywhere else on the site. It uses the display-posts-multisite shortcode, and there are a few parameters specific to events:
- Events
blog_idis 7. - The events post type is
tribe_events - Events Grid Template uses
template="events-grid"to display events in a grid layout. - Events List Template uses
template="events-list"to display events as a list. - Sponsor
sponsor_id=""limits the displayed events to particular sponsor(s) by id. - Venue
venue_id=""limits the displayed events to particular venue(s) by id.
Examples
Events grid
Note that events have custom attributes you can use to limit the display of events to particular sponsor(s) or venue(s). The attributes are sponsor_id and vendor_id, and you can supply a single id, or a comma-separated list of ids. For example: sponsor_id="1722" or venue_id="6450,1406,1279"
[display-posts-multisite blog_id="7" template="events-grid" post_type="tribe_events" posts_per_page="3" no_posts_message="There are currently no upcoming events."]
Events list
[display-posts-multisite blog_id="7" template="events-list" post_type="tribe_events" posts_per_page="4" no_posts_message="There are currently no upcoming events."]
15
Apr