Skip to main content

Event Calendar

The `[event_calendar]` shortcode displays a monthly grid calendar showing which days have events. Days with events are linked; clicking a day with a single event goes directly to that event, while a day with multiple events links to the day archive.…

Updated today

Event Calendar

The [event_calendar] shortcode displays a monthly grid calendar showing which days have events. Days with events are linked; clicking a day with a single event goes directly to that event, while a day with multiple events links to the day archive. Previous/next month navigation is provided.

What It Displays

A month-view calendar grid with the month name and year as caption. Days that have events are highlighted and linked. Navigation arrows in the footer allow moving between months.

When to Use It

Place on any page, post, or widget. id is optional — when supplied it filters the calendar to events belonging to that SportsPress Calendar post. Without id, all events site-wide are shown.

Parameters

Parameter

Type

Default

Description

id

integer

null

Post ID of a SportsPress Calendar to filter events.

status

string

'default'

Event publish status filter. 'default' uses the calendar's setting; also accepts 'future' or 'publish'.

format

string

'default'

Event format filter (e.g. a custom format slug).

date

string

'default'

Date filter preset.

date_from

string

'default'

Start date for a date range (YYYY-MM-DD).

date_to

string

'default'

End date for a date range (YYYY-MM-DD).

date_past

string

'default'

Number of days in the past to include.

date_future

string

'default'

Number of days in the future to include.

date_relative

string

'default'

Relative date mode.

day

string

'default'

Match day filter.

league

integer/string

null

League term ID or slug to filter by.

season

integer/string

null

Season term ID or slug to filter by.

venue

integer/string

null

Venue term ID or slug to filter by.

team

integer

null

Team post ID to filter events.

player

integer

null

Player post ID to filter events.

initial

boolean

true

true to show single-letter weekday initials in column headers; false to show abbreviated names.

caption_tag

string

'caption'

HTML tag used to wrap the month/year heading.

show_all_events_link

boolean

false

true to show a "View all events" link below the calendar when id is set.

override_global_date

boolean

false

true to reset the displayed month to the current month, ignoring any global month/year query variables.

Usage Examples

Minimal — all events for the current month:

[event_calendar]

Events from a specific calendar, filtered to a league and season:

[event_calendar id="30" league="5" season="8" show_all_events_link="1"]

Calendar showing only a team's events with abbreviated weekday headers:

[event_calendar team="12" initial="0"]

Did this answer your question?