Show all past meetings between two teams with detailed filtering options. Perfect for rivalry pages, pre-match analysis, or team comparison pages.

Use Cases
- Create rivalry/derby pages
- Show historical matchups before upcoming games
- Display team comparison statistics
- Feature classic encounters
Using the Shortcode Builder
The easiest way to create this shortcode is through the Shortcode Builder in your WordPress editor.
- Edit any page or post
- Click the SL Shortcodes button in the editor toolbar
- Select Games H2H from the Premium shortcodes list
- Configure the options using the visual interface
- Click Insert to add the shortcode
Parameters
| Parameter | Default | Description |
|---|---|---|
team_a | (required) | First team ID |
team_b | (required) | Second team ID |
tournament_id | – | Filter by tournament ID |
stage_id | – | Filter by tournament stage ID |
season_id | – | Filter by season ID |
league_id | – | Filter by league ID |
venue_id | – | Filter by venue ID |
finished | – | Filter by game status: 1 (finished), 0 (upcoming), empty (all) |
limit | 0 | Maximum games to show (0 = unlimited) |
show_game_datetime | 1 | Show game date/time: 1 or 0 |
show_team_name | 1 | Show team names: 1 or 0 |
show_team_logo | 1 | Show team logos: 1 or 0 |
sort_by_date | asc | Sort order: asc or desc |
date_before | – | Show games before specific date (YYYY-MM-DD) |
no_data_text | – | Custom message when no games found |
Examples
Basic H2H Between Two Teams
Display all historical meetings between two teams:
[sl-games-h2h team_a="12" team_b="25"]
Last 10 Meetings
Show only the most recent encounters:
[sl-games-h2h team_a="12" team_b="25" limit="10" sort_by_date="desc"]
H2H in Specific Tournament
Filter meetings to a specific tournament and season:
[sl-games-h2h team_a="12" team_b="25" tournament_id="8" season_id="2024"]
Historical Meetings Before 2020
Show only historical matches before a specific date:
[sl-games-h2h team_a="12" team_b="25" date_before="2020-01-01" sort_by_date="desc"]
Custom No Data Message
Display a custom message when no games are found:
[sl-games-h2h team_a="12" team_b="25" no_data_text="These teams have never met in competition."]
Tip
To find team IDs, go to Sports Leagues > Teams in your WordPress admin. The ID is shown in the team list or in the URL when editing a team.
