🎯 Need Help?

Get Premium Support

Priority assistance from the developer

More from ANWP

Football Leagues Premium

Complete football/soccer league management for WordPress

Learn more →

Games Head-to-Head Shortcode

Pro Feature

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.

  1. Edit any page or post
  2. Click the SL Shortcodes button in the editor toolbar
  3. Select Games H2H from the Premium shortcodes list
  4. Configure the options using the visual interface
  5. Click Insert to add the shortcode

Parameters

ParameterDefaultDescription
team_a(required)First team ID
team_b(required)Second team ID
tournament_idFilter by tournament ID
stage_idFilter by tournament stage ID
season_idFilter by season ID
league_idFilter by league ID
venue_idFilter by venue ID
finishedFilter by game status: 1 (finished), 0 (upcoming), empty (all)
limit0Maximum games to show (0 = unlimited)
show_game_datetime1Show game date/time: 1 or 0
show_team_name1Show team names: 1 or 0
show_team_logo1Show team logos: 1 or 0
sort_by_dateascSort order: asc or desc
date_beforeShow games before specific date (YYYY-MM-DD)
no_data_textCustom 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.