🎯 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 →

Player Stats Panel Shortcode

Pro Feature

The Player Stats Panel shortcode displays a visual statistics panel for a specific player with stat blocks. Create attractive stat panels showing key metrics for a player in block format – perfect for player profile pages, featured player sections, or player of the match displays.

Shortcode

[sl-player-stats-panel]

Screenshot

When to Use

  • Player profile stats section
  • Featured player showcase
  • Player of the match display
  • Career statistics panel
  • Season summary blocks

Shortcode Builder

The easiest way to create this shortcode is through the Shortcode Builder in WordPress admin. Navigate to Sports Leagues > Shortcodes, select “Player Stats Panel” from the list, and configure your options visually.

Parameters

Player Selection

ParameterDefaultDescription
player_id(required)Player ID to display stats for
statsComma-separated stat IDs to display (e.g., “goals,assists,yellow_cards”)

Query Filters

ParameterDefaultDescription
tournament_idFilter stats by tournament ID
stage_idFilter stats by tournament stage ID
season_idFilter stats by season ID
league_idFilter stats by league ID
filter_by_teamFilter stats by team ID
date_fromStart date for stats (format: YYYY-MM-DD)
date_toEnd date for stats (format: YYYY-MM-DD)

Display Options

ParameterDefaultDescription
headerCustom header text above the panel
layoutdefaultLayout style: empty for default, or cards
block_width120Width of each stat block in pixels
per_game0Show per-game averages: 1 to enable
season_text0Show season name text: 1 to enable
stat_titleSet to abbr to show abbreviations instead of full stat names
notesAdditional notes to display below the panel
classAdditional CSS classes for styling

Examples

Basic Player Stats Panel

Display selected statistics for a player:

[sl-player-stats-panel player_id="156" stats="goals,assists,yellow_cards"]

Season Statistics with Header

Show stats filtered by season with a custom header:

[sl-player-stats-panel player_id="156" season_id="45" stats="goals,assists,games_played" header="2024 Season Stats"]

Per-Game Averages

Display stats with per-game average calculations:

[sl-player-stats-panel player_id="156" tournament_id="15" per_game="1" stats="goals,assists,shots"]

Date Range Stats

Show statistics for a specific date range:

[sl-player-stats-panel player_id="156" date_from="2024-01-01" date_to="2024-06-30" stats="goals,assists"]

Cards Layout with Season Text

Use the cards layout and display the season name:

[sl-player-stats-panel player_id="156" stats="goals,assists,games_played" layout="cards" season_id="45" season_text="1"]

Custom Block Width

Adjust the width of stat blocks for more or fewer stats per row:

[sl-player-stats-panel player_id="156" stats="goals,assists,yellow_cards,red_cards" block_width="100"]

Finding Stat IDs

The stats parameter requires stat IDs from your Sport Configuration. To find these:

  1. Go to Sports Leagues > Settings > Sport Configuration
  2. Look at the Season Player Statistics section
  3. Use the stat ID values (e.g., goals, assists, yellow_cards)

Tip

Use the Shortcode Builder to select stats from a dropdown – it will automatically generate the correct stat IDs for you.

Related