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

Suspension Risk Shortcode

Pro Feature

Display players who are at risk of suspension due to accumulated yellow cards. Shows players who are one card away from a ban. Perfect for match previews, team news sections, or squad management pages.

Premium Feature

This shortcode requires the Football Leagues Premium plugin.

Basic Usage

[anwpfl-suspension-risk competition_id="12"]

This displays all players in competition 12 who are one yellow card away from suspension.

All Parameters

Parameter Default Description
competition_id * (required) Competition ID to check
club_id (all) Filter to specific club
include_ids (empty) Specific match IDs to check
header (empty) Custom header text
show_links 0 Link player names. Use 1 to enable
show_photos 1 Show player photos. Use 0 to hide
show_teams 1 Show team column. Use 0 to hide

* Required parameter

Examples

Example 1: Competition-Wide Risk List

When to use: Show all at-risk players in the league.

[anwpfl-suspension-risk competition_id="12" header="Players Walking a Tightrope"]

Result: All players one card away from suspension, with header.

Example 2: Club-Specific Risk

When to use: Club page showing their at-risk players.

[anwpfl-suspension-risk competition_id="12" club_id="8" show_teams="0"]

Result: Only club 8’s at-risk players (team column hidden since obvious).

Example 3: Match Preview

When to use: Pre-match page showing both teams’ risk players.

[anwpfl-suspension-risk competition_id="12" include_ids="501" header="Players at Risk This Match"]

Result: At-risk players from both teams in match 501.

Example 4: Minimal Display

When to use: Compact sidebar widget.

[anwpfl-suspension-risk competition_id="12" show_photos="0" show_links="1"]

Result: Text-only list with clickable player names.

Important

Suspension thresholds are determined by your plugin settings. Configure the number of yellow cards that trigger a suspension in Football Leagues Premium settings.

How It Works

The shortcode automatically calculates:

  1. Current yellow card count per player
  2. Suspension threshold from settings
  3. Players at threshold – 1 are shown as “at risk”

Troubleshooting

No players showing?

  • No players may be at risk currently
  • Verify card data is entered in match events
  • Check suspension threshold settings

Related