The Events Calendar Shortcode
Add to ListThis plugin adds a shortcode for use with The Events Calendar Plugin (by Modern Tribe).
With this plugin, just add the shortcode on a page to display a list of your events. For example to show next 8 events in the category festival:
[ecs-list-events cat="festival" limit="8"]
Shortcode Options:
- Basic shortcode:
[ecs-list-events]
- cat – Represents single event category.
[ecs-list-events cat='festival']
Use commas when you want multiple categories[ecs-list-events cat='festival, workshops']
- limit – Total number of events to show. Default is 5.
[ecs-list-events limit='3']
- order – Order of the events to be shown. Value can be ‘ASC’ or ‘DESC’. Default is ‘ASC’. Order is based on event date.
[ecs-list-events order='DESC']
- date – To show or hide date. Value can be ‘true’ or ‘false’. Default is true.
[ecs-list-events eventdetails='false']
- venue – To show or hide the venue. Value can be ‘true’ or ‘false’. Default is false.
[ecs-list-events venue='true']
- excerpt – To show or hide the excerpt and set excerpt length. Default is false.
[ecs-list-events excerpt='true']
//displays excerpt with length 100[ecs-list-events excerpt='300']
//displays excerpt with length 300
- thumb – To show or hide thumbnail image. Default is false.
[ecs-list-events thumb='true']
//displays post thumbnail in default thumbnail dimension from media settings. - You can use thumbwidth and thumbheight to customize the thumbnail size
[ecs-list-events thumb='true' thumbwidth='150' thumbheight='150']
or thumbsize for a registered WordPress size[ecs-list-events thumb='true' thumbsize='large']
- message – Message to show when there are no events. Defaults to ‘There are no upcoming events at this time.’
- viewall – Determines whether to show ‘View all events’ or not. Values can be ‘true’ or ‘false’. Default to ‘true’
[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false']
- contentorder – Manage the order of content with commas. Default to
title, thumbnail, excerpt, date, venue
.[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false' contentorder='title, thumbnail, excerpt, date, venue']
- month – Show only specific Month. Type
'current'
for displaying current month only or'next'
for next month[ecs-list-events cat='festival' month='2015-06']
- past – Show Outdated Events.
[ecs-list-events cat='festival' past='yes']
- key – Hide the event when the start date/time has passed
[ecs-list-events cat='festival' key='start date']
- orderby – Order by end date
[ecs-list-events orderby='enddate']
Additional options and benefits in the pro version
- design – Shows improved design by default, ‘compact’ for a more compact listing, ‘calendar’ for a monthly calendar view, ‘columns’ to show events horizontally in columns, or ‘grouped’ to group events by day
- days – Specify how many days in the future, for example [ecs-list-events days=”1″] for one day or [ecs-list-events days=”7″] for one week
- date – Show only events for a specific day [ecs-list-events date=’2017-04-16′]
- tag – Filter by one or more tags. Use commas when you want to filter by multiple tags.
- city, state, country – Display events by location.
- featured only – Show only events marked as “featured”
- id – Show a single event, useful for displaying details of the event on a blog post or page
- description – Use the full description instead of the excerpt of an event in the listing
- raw_description – Avoid filtering any HTML (spacing, links, bullet points, etc) in the description
- raw_excerpt – Avoid filtering any HTML (spacing, links, etc) in the excerpt
- year – Show only events for a specific year
- date range – Show only events between certain days
- timeonly – To show just the start time of the event. [ecs-list-events timeonly=’true’]
- offset – Skip a certain number of events from the beginning, useful for using multiple shortcodes on the same page (with ads in between) or splitting into columns
- custom design – Create one or more of your own templates for use with the shortcode
- hiderecurring – To only show the first instance of a recurring event, set to ‘true’
This plugin is not developed by or affiliated with The Events Calendar or Modern Tribe in any way.