Sports API Hub supports multiple sports in a single WordPress installation. Each sport has its own statistics schema, display logic, and permalink base. You enable the sports you need in API & Import > API Config, and the plugin handles the rest.
Supported Sports
| Sport | ID | Permalink Base | Status |
|---|---|---|---|
| 🏀 Basketball | 1 | /basketball/ | Available |
| ⚾ Baseball | 2 | /baseball/ | Available |
| 🏏 Cricket | 3 | /cricket/ | Planned |
| 🏈 Rugby | 4 | /rugby/ | Planned |
| 🏒 Ice Hockey | 5 | /ice-hockey/ | Planned |
| 🏈 American Football | 6 | /american-football/ | Planned |
| 🥏 Handball | 7 | /handball/ | Planned |
| 🏐 Volleyball | 8 | /volleyball/ | Planned |
Available means full implementation: box scores, career stats, game flow charts, aggregate stats, and sport-specific display logic.
Planned sports will be added in future updates based on customer demand.
🏀 Basketball
The most complete implementation. Features include:
- Box scores with 25 stat columns (points, rebounds, assists, shooting percentages, etc.)
- Team statistics comparison with visual comparison bars
- Play-by-play timeline with scoring events and period breaks
- Game flow charts (Score Lines + Lead Tracker via ECharts)
- Career stats with season-by-season averages
- Home/Away splits, monthly splits, and opponent stats
- Aggregate stats (season stats, season ranks, leaders, player averages)
- Highlight chart with SVG ring charts and league rank badges
- Roster grouping by position: Guards, Forwards, Centers
- Standings with home/away splits and division/conference levels
Incidents: Goal events (one-point, two-point, three-point), period breaks, overtime breaks. No cards or substitutions.
Display order: US sport convention — Away @ Home (away team listed first).
⚾ Baseball
Full statistical implementation with sport-specific tables:
- Box scores with separate batting and pitching tables
- Batting stats (AVG, HR, RBI, OBP, SLG, OPS, and more)
- Pitching stats (ERA, SO, WHIP, IP, W-L, and more)
- Career stats with computed rates (batting averages, ERA)
- R/H/E scoring (Runs, Hits, Errors in period table)
- Roster grouping by position: Pitchers, Infield, Outfield
- Unplayed innings displayed as dashes (ESPN convention)
Display order: US sport convention — Away @ Home.
Note
Baseball does not have play-by-play incidents from the API. Team-level aggregate stats (leaders, rankings) are computed from per-game data in the database.
Enabling Sports
- Go to API & Import > API Config
- In the Sports section, check the sports you want to enable
- Click Save Settings
Enabling a sport adds it to admin filters and unlocks import options. Disabling a sport hides it from the admin interface but does not delete existing data — you can re-enable it later and all previously imported data will still be there.
Multi-Sport on One Site
Each sport operates independently:
- Separate permalink bases —
/basketball/game/123and/baseball/game/456do not conflict - Separate statistics tables — basketball and baseball have different stat schemas
- Separate admin filters — the Games list can be filtered by sport
- Shared entity tables — teams, players, games share tables but are isolated by
sport_id - Separate Layout Builder layouts — different page layouts per sport
Display Order: Home vs. Away
The API includes a flag that determines how teams are displayed:
| Convention | Sports | Display |
|---|---|---|
| US sports | Basketball, Baseball, Ice Hockey, American Football | Away @ Home (away team listed first) |
| European | Rugby, Cricket, Handball, Volleyball | Home vs Away (home team listed first) |
This affects game cards, game headers, and all templates. The flag is set per tournament by the API — the plugin reads it and arranges teams accordingly.
API Provider and Sport Availability
| Provider | Sports |
|---|---|
| AllSportsAPI2 | All sports (multi-sport) |
| BasketAPI1 | Basketball only |
| BaseballAPI | Baseball only |
The provider is a global setting. If you need multiple sports, use AllSportsAPI2. Dedicated providers (BasketAPI1, BaseballAPI) may offer better rate limits for single-sport sites.
📚 Related
- API Setup — provider selection and sport enablement
- Games — game data and statuses (sport-aware)
- Permalinks — per-sport URL customization
- Supported Sports Reference — technical capability matrix