🎯 Need Help?

Get Premium Support

Priority assistance from the developer

⬆️ Upgrade

Unlock all features

More from ANWP

Sports Leagues Premium

Multi-sport league management with advanced statistics

Learn more →

AnWP SL Theme Kit

Starter themes & block patterns for Sports Leagues

Learn more →

Matches Section Shortcode

Pro Feature

Display specific match sections (goals, cards, lineups, stats, etc.) for multiple matches with optional match headers. Perfect for creating match digest pages, event summaries, or highlighting specific aspects across games.

Premium Feature

This shortcode requires the Football Leagues Premium plugin.

Basic Usage

[anwpfl-matches-section section="goals" competition_id="12" limit="5"]

This displays goal scorers from the last 5 matches in competition 12.

Available Sections

Section Description
goals Goal scorers list
cards Yellow and red cards
lineups Starting lineups
substitutes Substitute players
formation Team formations (Premium)
match-stats Match statistics
player-stats Player statistics (Premium)
referees Match officials
missing Missing/injured players
gallery Match photos
video Match video
commentary Match commentary (Premium)
timeline Match timeline (Premium)
h2h Head to head matches (Premium)
odds Betting odds (Premium)
predictions Match predictions (Premium)
latest Recent form (last matches)
missed_penalties Missed penalty kicks
penalty_shootout Penalty shootout results

All Parameters

Primary Parameters

Parameter Default Description
section * (required) Section type to display (see table above)
header (none) Match header: header, scoreboard, or slim
section_header 0 Show section title. Use 1 to enable

Query Parameters

Parameter Default Description
competition_id (empty) Competition ID(s), comma-separated
stage_id (empty) Stage ID(s) for multistage competitions
season_id (empty) Season ID filter
league_id (empty) League ID filter
group_id (empty) Group ID to filter matches by. Use together with stage_id for group stages
type (all) Match type: result or fixture
limit 10 Number of matches. Use 0 for all

Date Filters

Parameter Default Description
date_from (empty) Start date (YYYY-MM-DD)
date_to (empty) End date (YYYY-MM-DD)
days_offset (empty) Dynamic start: “-2” for 2 days ago
days_offset_to (empty) Dynamic end: “1” for tomorrow

Match Filters

Parameter Default Description
filter_by_clubs (empty) Club ID(s), comma-separated
home_club (empty) Filter by home club ID
away_club (empty) Filter by away club ID
stadium_id (empty) Filter by stadium ID
filter_by_matchweeks (empty) Matchweek numbers, comma-separated
include_ids (empty) Specific match IDs to include
exclude_ids (empty) Match IDs to exclude

Sorting & Grouping

Parameter Default Description
sort_by_date (none) Sort order: asc or desc
group_by (none) Group by: day, month, matchweek, stage, competition

* Required parameter

Examples

Example 1: Weekend Goals Summary

When to use: Recap page showing all goals from recent matches.

[anwpfl-matches-section section="goals" competition_id="12" days_offset="-3" header="slim" section_header="1"]

Result: Goals from last 3 days with match headers and “Goals” section titles.

Example 2: Discipline Report

When to use: Show all cards from a matchweek.

[anwpfl-matches-section section="cards" competition_id="12" filter_by_matchweeks="15" header="scoreboard"]

Result: All yellow/red cards from matchweek 15 with scoreboard headers.

Example 3: Match Statistics Comparison

When to use: Detailed stats for selected matches.

[anwpfl-matches-section section="match-stats" include_ids="501,502,503" header="header"]

Result: Full statistics for specific matches.

Example 4: Team Lineups

When to use: Show starting XIs for a club’s matches.

[anwpfl-matches-section section="lineups" filter_by_clubs="8" limit="5" type="result"]

Result: Lineups from club 8’s last 5 results.

Example 5: Match Highlights Gallery

When to use: Photo galleries from recent matches.

[anwpfl-matches-section section="gallery" competition_id="12" limit="10" group_by="day"]

Result: Match galleries grouped by date.

Tip

Use multiple shortcodes on one page to create a comprehensive match digest – one for goals, one for cards, one for player stats. Each can use the same match filters for consistency.

Troubleshooting

Section not showing data?

  • Verify the section data exists in the matched games
  • Check that matches have the required data entered (lineups, stats, etc.)

Wrong matches appearing?

  • Review your filter combination – they work together
  • Check date filters are in correct format (YYYY-MM-DD)

Related