Display individual player statistics in a visual panel format. Shows selected stats as boxes with total values and per-game averages. Perfect for player profile pages, featured player sections, or match preview player comparisons.
Premium Feature
This shortcode requires the Football Leagues Premium plugin.
Basic Usage
[anwpfl-player-stats-panel player_id="45" stats="goals,assists,minutes"]
This displays goals, assists, and minutes for player 45 in visual stat boxes.
All Parameters
Selection Parameters
| Parameter | Default | Description |
|---|---|---|
player_id * |
(required) | Player ID to display statistics for |
stats |
(all) | Stats to display (comma-separated) |
Available Stats
| Stat | Description |
|---|---|
played |
Games played |
started |
Games started |
sub_in |
Substitute appearances |
minutes |
Minutes played |
cards_all |
All cards combined |
card_y |
Yellow cards |
card_yr |
Second yellow/red cards |
card_r |
Red cards |
goals |
Goals scored |
goals_penalty |
Penalty goals |
own_goals |
Own goals |
assists |
Assists |
goals_conceded |
Goals conceded (GK) |
clean_sheets |
Clean sheets (GK) |
{custom_stat} |
Custom stats defined in settings |
Query Parameters
| Parameter | Default | Description |
|---|---|---|
competition_id |
(all) | Filter to specific competition |
season_id |
(all) | Filter to specific season |
league_id |
(all) | Filter to specific league |
club_id |
(all) | Filter to specific club |
show_secondary |
1 | Include secondary stages (multistage competitions). Use 0 to disable |
date_from |
(empty) | Start date (YYYY-MM-DD) |
date_to |
(empty) | End date (YYYY-MM-DD) |
days_offset |
(empty) | Dynamic start date. Use negative for past (e.g., -30 = 30 days ago), positive for future |
days_offset_to |
(empty) | Dynamic end date. Use 0 for today, positive for future days |
Note
By default, show_secondary="1" includes all stages of multistage competitions. The Competition Selector only shows main stages. To get statistics for a specific stage (knockout or playoff), enter the stage ID manually in competition_id and set show_secondary="0".
Display Parameters
| Parameter | Default | Description |
|---|---|---|
per_game |
1 | Show per-game averages. Use 0 to hide |
block_width |
(auto) | Custom width for stat blocks in pixels |
header |
(empty) | Custom header text |
* Required parameter
Examples
Example 1: Striker Stats
When to use: Forward/striker player profile.
[anwpfl-player-stats-panel player_id="45" stats="played,goals,assists,goals_penalty"]
Result: Attacking stats with totals and per-game averages.
Example 2: Goalkeeper Stats
When to use: Goalkeeper player profile.
[anwpfl-player-stats-panel player_id="12" stats="played,minutes,goals_conceded,clean_sheets"]
Result: Goalkeeper-specific statistics.
Example 3: Season-Specific Stats
When to use: Show stats for current season only.
[anwpfl-player-stats-panel player_id="45" season_id="5" stats="goals,assists,minutes"]
Result: Stats from season 5 only.
Example 4: Competition Stats
When to use: Stats from a single competition (e.g., Champions League only).
[anwpfl-player-stats-panel player_id="45" competition_id="25" stats="played,started,goals,assists"]
Result: Stats from competition 25 only.
Example 5: Totals Only (No Averages)
When to use: Cleaner display without per-game values.
[anwpfl-player-stats-panel player_id="45" stats="goals,assists" per_game="0"]
Result: Shows only total values.
Example 6: Last 90 Days Form
When to use: Track recent performance with auto-updating dates.
[anwpfl-player-stats-panel player_id="45" days_offset="-90" days_offset_to="0" stats="goals,assists,minutes"]
Result: Stats from last 90 days, updating daily without editing the shortcode.
Tip
You can use custom stats defined in your plugin settings. The stat key should match what you’ve configured in the Premium plugin’s custom stats section.
Troubleshooting
Stats showing zeros?
- Verify the player has match appearances
- Check that match events (goals, cards) are recorded
- Review filter parameters (season_id, competition_id)
Custom stats not appearing?
- Verify custom stat is defined in plugin settings
- Check the stat key matches exactly
Related
[anwpfl-player-data]– Full player profile (Core)[anwpfl-stats-players]– Multi-player statistics table[anwpfl-stats-h2h]– Head-to-head comparison
