Skip to main content

Event Matrix

The `[event_matrix]` shortcode displays a head-to-head results grid between teams. Rows and columns both represent teams; each cell shows the result of the fixture between those two teams. This is sometimes called a "results matrix" or "cross-table."

Updated today

Event Matrix

The [event_matrix] shortcode displays a head-to-head results grid between teams. Rows and columns both represent teams; each cell shows the result of the fixture between those two teams. This is sometimes called a "results matrix" or "cross-table."

Requires SportsPress Pro. The Results Matrix module must be enabled.

What It Displays

A scrollable grid table with teams on both axes. Each cell at the intersection of a row team and a column team displays the result of that fixture (linked to the event page when link_events is enabled). Cells on the diagonal (a team vs itself) are typically blank.

When to Use It

Embed on any page. Supply id pointing to a SportsPress Calendar post. The Calendar should be associated with a league/season so the correct set of teams can be determined. Without id, the shortcode uses get_the_ID().

Parameters

Parameter

Type

Default

Description

id

integer

null

Post ID of the SportsPress Calendar containing the events.

status

string

'default'

Event status filter: 'default', 'future', 'publish'.

date

string

'default'

Date preset filter.

date_from

string

'default'

Start of date range (YYYY-MM-DD).

date_to

string

'default'

End of date range (YYYY-MM-DD).

date_past

string

'default'

Days in the past to include.

date_future

string

'default'

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.

season

integer/string

null

Season term ID or slug.

date_format

string

From settings

PHP date format for cell date display. Default from Results Matrix > Date Format setting (M j).

show_team_logo

boolean

From settings

1 to display team logos in row/column headers. Default from the Results Matrix > Display logos setting.

link_events

boolean

From settings

1 to link result cells to event pages.

link_teams

boolean

From settings

1 to link team names in headers to team pages.

scrollable

boolean

From settings

1 to enable horizontal scrolling on narrow screens.

show_all_events_link

boolean

false

1 to show a "View all events" link below the matrix (requires id).

Usage Examples

Minimal — matrix from a specific calendar:

[event_matrix id="30"]

Matrix filtered to a specific league and season, with team logos:

[event_matrix id="30" league="3" season="7" show_team_logo="1"]

Matrix with linked results and teams, scrollable:

[event_matrix id="30" link_events="1" link_teams="1" scrollable="1"]

Did this answer your question?