League Table
The [league_table] shortcode displays a team standings table with configurable stat columns, sorting, and pagination.
What It Displays
A data table with one row per team showing configured statistics columns (wins, draws, losses, points, goal difference, etc.). The first column shows team rank (position), the second shows team name with an optional logo. Highlighted position bands (promotion, relegation zones) follow the configuration of the League Table post.
When to Use It
Use on any page. Supply id pointing to a SportsPress League Table post. Inside the Loop on a single League Table page, id can be omitted.
Parameters
Parameter | Type | Default | Description |
| integer |
| Post ID of the League Table. Required outside the Loop. |
| integer |
| Maximum number of teams to display. |
| string/array |
| Comma-separated column slugs to override the League Table's column selection (e.g. |
| string | From post meta | Comma-separated position ranges to highlight (e.g. zones). Defaults to the |
| boolean |
|
|
| string/boolean |
| Override the displayed heading. |
| boolean | From settings |
|
| boolean | From settings |
|
| boolean | From settings |
|
| boolean | From settings |
|
| boolean | From settings |
|
| boolean | From settings |
|
| boolean | From settings |
|
| integer | From settings | Rows per page when pagination is active. Default from Tables > Rows setting ( |
| boolean | — | When set, overrides whether published (past) events are included in calculations. |
| boolean | — | When set, overrides whether future events are included in calculations. |
Usage Examples
Minimal — full league table:
[league_table id="42"]
Top 5 teams with custom columns, logos, and a "View full table" link:
[league_table id="42" number="5" columns="w,d,l,pts" show_team_logo="1" link_posts="1" show_full_table_link="1"]
Compact table without pagination:
[league_table id="42" paginated="0" sortable="0"]
