Skip to main content

Player List

The `[player_list]` shortcode displays a roster table of players with their configured statistics columns. Players can be sorted, paginated, grouped by position, and filtered by team or season.

Updated today

Player List

The [player_list] shortcode displays a roster table of players with their configured statistics columns. Players can be sorted, paginated, grouped by position, and filtered by team or season.

What It Displays

A data table with one row per player. The first column shows player name (with optional photo and nationality flag). Subsequent columns show configured performance statistics. Players can be grouped under position headings when grouping="position" is set.

When to Use It

Use on any page. Supply id pointing to a SportsPress Player List post. Inside the Loop on a Player List post page, id can be omitted.

Parameters

Parameter

Type

Default

Description

id

integer

get_the_ID()

Post ID of the Player List. Required outside the Loop.

title

string/boolean

false

Override the displayed heading.

number

integer

-1

Maximum number of players to display. -1 shows all (or uses the list's own number setting).

columns

string/array

null

Comma-separated performance column slugs to override the list's column selection (e.g. 'appearances,goals'). Also accepts the legacy parameter name performance.

grouping

string/null

From list

Group players: 'position' to group by position, or leave empty for no grouping. Defaults to the Player List's grouping setting.

grouptag

string

'h4'

HTML heading tag for group labels when grouping is active (e.g. 'h3', 'h4').

orderby

string

'default'

Column slug to sort by. 'default' uses the list's own sort setting.

order

string

'ASC'

Sort direction: 'ASC' or 'DESC'.

leagues

integer/string

null

League term ID(s) to filter player stats by league.

seasons

integer/string

null

Season term ID(s) to filter player stats by season.

team

integer

null

Team post ID to filter players by current team.

show_all_players_link

boolean

false

1 to show a "View all players" link below the table (requires id).

show_title

boolean

From settings

1 to display the Player List title as a heading.

show_player_photo

boolean

From settings

1 to display player photos in the name column.

show_player_flag

boolean

From settings

1 to display nationality flags in the name column.

team_format

string

From settings

How to display team column: 'name', 'logo', or 'both'.

link_posts

boolean

From settings

1 to link player names to player pages.

link_teams

boolean

From settings

1 to link team names to team pages.

sortable

boolean

From settings

1 to enable client-side column sorting.

responsive

boolean

From settings

1 to enable responsive table mode.

scrollable

boolean

From settings

1 to enable horizontal scrolling.

paginated

boolean

From settings

1 to paginate the table.

rows

integer

From settings

Rows per page when pagination is active. Default from Lists > Rows setting (10).

Usage Examples

Minimal — full player list:

[player_list id="55"]

Top 10 goal scorers, sorted descending, grouped by position:

[player_list id="55" number="10" orderby="goals" order="DESC" grouping="position" grouptag="h3"]

Player list for a specific team, with photos, linked names, and a "View all players" link:

[player_list id="55" team="12" show_player_photo="1" link_posts="1" show_all_players_link="1"]

Compact list without pagination, custom columns:

[player_list id="55" columns="appearances,goals,assists" paginated="0"]

Did this answer your question?