=== AnWP Sports Leagues - Basketball, Ice Hockey, Handball, Rugby & More ===
Contributors:      anwppro
Donate link:       https://anwp.pro/
Tags:              sports, statistics, league, tournament, team
Tested up to:      6.9
Stable tag:        0.14.1
License:           GPLv2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html

Professional sports league management for WordPress. Track teams, players, games, statistics, tournaments & standings for any team sport.

== Description ==

**Sports Leagues** transforms WordPress into a powerful sports management platform for basketball, ice hockey, rugby, handball, volleyball, cricket, baseball, and all team sports.

Perfect for sports clubs, league administrators, team managers, coaches, and sports bloggers who need professional-grade league management without complex setup.

### ⚠️ Important Notes

* **One Sport Per Installation** - Plugin configured for one sport at a time
* **Requires CMB2** - Free [CMB2 plugin](https://wordpress.org/plugins/cmb2/) must be installed
* **For Soccer/Football** - Use our dedicated [Football Leagues](https://wordpress.org/plugins/football-leagues-by-anwppro/) plugin instead

### 🏀 Live Demo Sites

**Free Version:**
🏒 **Ice Hockey:** [Tournament](https://sl-hockey.anwp.pro/tournament/hockey-league-2018-2019/) | [Game](https://sl-hockey.anwp.pro/game/blades-komodos-2018-12-07/) | [Team](https://sl-hockey.anwp.pro/team/blades/) | [Player](https://sl-hockey.anwp.pro/player/zachary-mack/)

**Premium Version:**
🏀 **Basketball (NBA):** [Home](https://slpro-nba.anwp.pro/) | [Game](https://slpro-nba.anwp.pro/game/washington-wizards-toronto-raptors-2024-04-08/) | [Team](https://slpro-nba.anwp.pro/team/atlanta-hawks/) | [Player](https://slpro-nba.anwp.pro/player/d-murray/)
🏈 **American Football:** [Home](https://slpro-football.anwp.pro/) | [Game](https://slpro-football.anwp.pro/game/iota-creatures-theta-enigmas-2022-11-01/) | [Team](https://slpro-football.anwp.pro/team/swallows/)
🏒 **Ice Hockey:** [Tournament](https://slpro-hockey.anwp.pro/tournament/hockey-league-2018-2019/) | [Game](https://slpro-hockey.anwp.pro/game/blades-komodos-2018-12-07/)

### ✨ Core Features

**Complete Sports Management**

* ✅ **Players** - Full profiles with photos, statistics, career history, birthdays
* ✅ **Teams** - Team management with rosters, logos, social links, galleries
* ✅ **Games/Matches** - Comprehensive game data: scores, events, lineups, statistics
* ✅ **Tournaments** - Round-robin, knockout, and multi-stage competitions
* ✅ **Standings** - Automatic league table calculation with custom ranking rules
* ✅ **Venues** - Stadium/arena management with maps, photos, upcoming games
* ✅ **Staff** - Coaches, managers, support staff with profiles
* ✅ **Officials** - Referee and official tracking

**Advanced Statistics Engine**

* 📊 Custom player statistics configurator (sport-specific stats)
* 📊 Game-by-game player performance tracking
* 📊 Season aggregate statistics (automatic calculation)
* 📊 Team statistics and comparisons
* 📊 Dynamic standing table with custom columns
* 📊 Player position groups and stat categories

**Tournament Management**

* 🏆 Knockout stages with bracket visualization
* 🏆 Round-robin group stages
* 🏆 Multi-stage tournaments (groups → playoffs)
* 🏆 Custom rounds and groups
* 🏆 Game day organization
* 🏆 Tournament cloning feature
* 🏆 Season-based organization

**Game Features**

* 🏀 Game events timeline (goals, penalties, cards, substitutions)
* 🏀 Period/quarter scores
* 🏀 Overtime and penalty shootout support
* 🏀 Player lineups with positions and numbers
* 🏀 Missing players/injuries tracking
* 🏀 Photo galleries and videos
* 🏀 Countdown timer for upcoming games
* 🏀 Special status (postponed, TBD)

**Flexible Display Options**

* 📱 **7 Gutenberg Blocks** - Game Countdown, Tournament Header, Next Game, Last Game, Teams, Games List, Player Stats
* 📱 **6 Shortcodes** - Standings, Games, Teams, Players Stats, Tournament Header, Player
* 📱 **9 Classic Widgets** - Standing Table, Next Game, Last Game, Players Stats, Teams, Player, Birthdays, Games, Game Video
* 📱 **101 Template Files** - Fully customizable in your theme
* 📱 **Responsive Design** - Mobile-friendly layouts

**Customization & Configuration**

* 🎨 Sport Configurator with presets (Basketball, Hockey, Rugby, etc.)
* 🎨 Custom player positions per sport
* 🎨 Custom game event types (configurable icons)
* 🎨 WordPress Customizer integration (colors, layout options)
* 🎨 Custom text override (change any frontend text)
* 🎨 Standing table color schemes
* 🎨 Template override system
* 🎨 RTL (Right-to-Left) support

**Data Management**

* 💾 Excel-like import tool (teams, players, venues, staff)
* 💾 Season-specific team rosters
* 💾 Player ID & External ID support
* 💾 Bulk operations
* 💾 Custom database tables (optimized performance)
* 💾 Smart caching system

**Admin Interface**

* 🖥️ Modern Vue.js admin pages (fast, reactive)
* 🖥️ Intuitive game editor
* 🖥️ Visual tournament builder
* 🖥️ Statistics configurator
* 🖥️ Quick setup helper
* 🖥️ Admin dashboard with insights

**Developer Friendly**

* 🔧 100+ action/filter hooks for extensions
* 🔧 REST API endpoints
* 🔧 Template hierarchy system
* 🔧 WordPress Coding Standards compliant

### 🎯 Perfect For

* Sports clubs and organizations
* League administrators
* Team managers and coaches
* Tournament organizers
* Sports news websites
* Youth sports programs
* Amateur and professional leagues

### 🚀 Supported Sports

Basketball, Ice Hockey, Handball, Rugby, Volleyball, Cricket, Baseball, American Football, Water Polo, Field Hockey, Lacrosse, Futsal, and most team sports.

**Not suitable for:** Individual sports (tennis, golf, etc.) or combat sports (MMA, boxing). For soccer/football use [Football Leagues plugin](https://wordpress.org/plugins/football-leagues-by-anwppro/).

### 📚 Documentation & Support

* **[Documentation](https://support.anwp.pro/knowledge-bases/6-sports-leagues)** - Comprehensive guides
* **[New Documentation Portal (in progress)](https://anwp.pro/docs/sports-leagues/)**
* **[Quick Start Guide](https://support.anwp.pro/knowledge-bases/6/articles/76-start-guide)** - Get started in 10 minutes
* **[Community Forum](https://support.anwp.pro/communities/4-sports-leagues)** - Ask questions, request features, report bugs
* **[Video Tutorials](https://www.youtube.com/watch?v=aSFw5POd_iA)** - Step-by-step visual guides

https://www.youtube.com/watch?v=aSFw5POd_iA

### 🌐 Translation Ready

* Full internationalization support
* Contribute translations via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/sports-leagues/)
* RTL (Right-to-Left) support included
* Custom text override for any language

### 💎 Premium Version

Want advanced features? **[Sports Leagues Premium](https://anwp.pro/sports-leagues-premium-addon/)** adds:

**API Data Import** - Automatic data sync from api-football.com (NBA, Basketball, NFL)
**Premium Layouts** - Advanced display templates
**Page Layout Builder** - Custom page designs with tabs
**Bracket View** - Visual knockout stage brackets
**Results Matrix** - Head-to-head results table
**Premium Blocks** - 6 additional Gutenberg blocks
**Standing Advanced** - Conference/Division support, advanced columns
**User Roles** - Assign game edit rights to users
**Auto Timezone** - Visitor's local kickoff times
**Game Formation** - Team formation display
**Commentary Block** - Live game commentary
**Team Trophies** - Trophy/award management
**Calendar Widget** - Monthly calendar view
**Priority Support** - Faster response times

[View All Premium Features](https://anwp.pro/sports-leagues-premium-addon/) | [Premium Demos](https://slpro-nba.anwp.pro/)

**Premium Tutorials:**
* [Building NBA Live Scores Website](https://anwp.pro/ultimate-guide-to-building-nba-basketball-live-scores-stats-website-in-wordpress/)
* [Creating NFL Live Scores Site](https://anwp.pro/how-to-create-nfl-live-scores-website-in-wordpress/)

### 🚀 SL Kit — Launch Your Sports Site in 30 Minutes

Want a ready-to-use sports website without building from scratch? **[SL Kit](https://anwp.pro/sl-kit/)** is a complete WordPress starter kit that includes Sports Leagues Premium, pre-configured Kadence theme, 15+ professionally designed pages, and 100+ demo items. Import the demo, add your data, and go live.

Perfect for youth sports, amateur clubs, league administrators, and web designers who need a polished sports site fast.

[Learn More About SL Kit](https://anwp.pro/sl-kit/)

== Installation ==

### Minimum Requirements

* WordPress 5.9 or higher
* PHP 7.4 or higher
* MySQL 5.7 or higher
* WordPress REST API enabled

### Automatic Installation

1. Log into your WordPress admin panel
2. Go to **Plugins → Add New**
3. Search for **"Sports Leagues"**
4. Click **Install Now** on "AnWP Sports Leagues"
5. Click **Activate** after installation
6. Install required **CMB2 plugin** when prompted
7. Go to **Sports Leagues → Sport Configurator** to configure your sport

### Manual Installation

1. Download the plugin ZIP file
2. Go to **Plugins → Add New → Upload Plugin**
3. Choose the downloaded ZIP file and click **Install Now**
4. Click **Activate** after installation
5. Install required [CMB2 plugin](https://wordpress.org/plugins/cmb2/)
6. Go to **Sports Leagues → Sport Configurator** to select your sport

### Post-Installation Setup

1. **Select Sport:** Sports Leagues → Sport Configurator (choose Basketball, Hockey, etc.)
2. **Configure Settings:** Review player positions, game events, statistics
3. **Create Structure:** Add Seasons and Leagues (taxonomies)
4. **Add Teams:** Create teams with logos
5. **Add Players:** Create player profiles
6. **Build Rosters:** Assign players to teams via Team → Roster tab
7. **Create Tournament:** Add tournament and select participating teams
8. **Add Games:** Create games within tournament
9. **Display Content:** Use shortcodes, blocks, or widgets on your site

**Detailed Setup Guide:** [Quick Start Guide](https://support.anwp.pro/knowledge-bases/6/articles/76-start-guide)

== Frequently Asked Questions ==

= Will this plugin work with my theme? =

Yes! Sports Leagues works with most WordPress themes. The plugin uses standard WordPress template hierarchy and includes responsive CSS. If you experience styling issues, our support team can help with custom CSS.

**Note:** Full Site Editing (FSE) themes have limited support. Classic themes and block themes work best.

= Can I use this for multiple sports on the same site? =

No. Sports Leagues is designed for **one sport per installation**. Each sport has unique positions, statistics, and rules that require dedicated configuration.

For multiple sports, consider:
* Using WordPress Multisite (separate site per sport)
* Installing multiple separate WordPress installations

= Do I need coding knowledge to use this plugin? =

No! Sports Leagues includes an intuitive admin interface with visual editors. Basic WordPress knowledge is sufficient.

For advanced customization (custom templates, hooks), PHP/HTML/CSS knowledge helps but isn't required for standard use.

= How do I import existing data? =

Use the built-in **Import Data Tool**:

1. Navigate to **Sports Leagues → Import Data Tool** in WordPress admin
2. Prepare your data in any spreadsheet application (Excel, Google Sheets, LibreOffice, etc.)
   - Include all relevant information in separate columns
3. In the Import Data Tool, create columns matching your spreadsheet structure
4. Copy data from your spreadsheet and paste into the Import Tool
5. Review data and click **Import** to complete

**Tip:** Start with a small test import (5-10 rows) before importing large datasets.

Supports: Teams, Players, Venues, Staff, Officials

= Can visitors edit game data? =

Not in the free version. Only WordPress admin users with appropriate capabilities can edit game data.

The **Premium version** includes User Roles feature - assign game editing rights to registered users without admin access.

= Does it work with Gutenberg? =

Yes! Includes **7 dedicated Gutenberg blocks** with live preview. Also supports Classic Editor via shortcodes and widgets.

= How do I display standings/games on my site? =

Three methods:

**Gutenberg Blocks** (Block Editor):
* Add block → Search "Sports Leagues"
* Select desired block (Standing, Games, etc.)
* Configure options in block settings

**Shortcodes** (Classic Editor or text widgets):
* Example: `[anwpsl-standing id="123"]`
* Use Shortcode Builder tool in admin for easy generation

**Widgets** (Sidebars/widget areas):
* Go to Appearance → Widgets
* Add Sports Leagues widgets to desired areas

= Is it translation-ready? =

Yes! Fully internationalized with:

* Translation files included (.pot template)
* RTL (Right-to-Left) support
* Contribute translations via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/sports-leagues/)
* Custom text override feature (change any text without translation files)

= What's the difference between Free and Premium? =

**Free Version** includes complete league management: teams, players, games, tournaments, standings, statistics, shortcodes, blocks, widgets.

**Premium Version** adds: API data import, bracket view, results matrix, premium layouts, page builder, conference/division standings, user roles, premium blocks, priority support.

[Compare Features](https://anwp.pro/sports-leagues-premium-addon/)

= Where can I get support? =

* **Community Forum:** [support.anwp.pro/communities/4-sports-leagues](https://support.anwp.pro/communities/4-sports-leagues)
* **Documentation:** [support.anwp.pro/knowledge-bases/6-sports-leagues](https://support.anwp.pro/knowledge-bases/6-sports-leagues)
* **New Documentation Portal (in progress):** [anwp.pro/docs/sports-leagues](https://anwp.pro/docs/sports-leagues/)
* **Premium Support:** Included with Premium version

= Can I customize the appearance? =

Yes! Multiple customization options:

* **WordPress Customizer** - Colors, layout options (Appearance → Customize → Sports Leagues)
* **Custom CSS** - Add in Appearance → Customize → Additional CSS
* **Template Override** - Copy templates to your theme's `/anwp-sports-leagues/` folder
* **Hooks & Filters** - 100+ developer hooks for advanced customization

== Screenshots ==

1. Tournament - Complete tournament view with standings and games
2. Game Finished - Header section with team info, scores, and venue details
3. Game Finished - Players Statistics with sortable columns
4. Game Finished - Videos, Photo Gallery, and Latest Games section
5. Game Upcoming - Countdown timer and team preview
6. Game Finished - Team Statistics comparison table
7. Team - Profile header, latest/upcoming games, and season roster
8. Team - Players Statistics aggregated by season
9. Venue - Stadium profile with map, photo gallery, and game schedule
10. Player - Player profile with career statistics and recent games
11. Staff - Coach/staff profile with team history
12. Import Tool - Bulk import teams, players, venues, and staff
13. Tournament Editor - Admin interface for tournament structure (stages, groups, rounds)
14. Team Editor - Roster management with drag-and-drop player assignment
15. Game Editor - Main game data entry (teams, scores, venue, officials)
16. Game Editor - Events timeline and game players
17. Players Statistics Configurator - Define custom statistics for your sport
18. Sports Configurator - Sport selection and preset configuration

== Changelog ==

= 0.14.1 - 2026-02-12 =
* Update - Admin menu reorganization with grouped CPT structure
* Add - League and venue support in SL Selector
* Update - Shortcode Builder with collapsible sections and modern field layout
* Add - Live preview panel in Shortcode Builder with width toggle
* Add - Parse existing shortcode to populate form fields
* Fix - Import tool dropdown fields not mapped correctly when pasting from spreadsheets

= 0.14.0 - 2025-11-12 =
* Add - Roster shortcode
* Update - SL Selector
* Update - Game Edit - custom numbers are automatically filled on adding a player to the lineups (if squad number is set)
* Update - Game Edit - player statistics interface and usability
* Update - Accessibility throughout the plugin
* Update - Data Import Tool functionality and reliability
* Update - Minor improvements in styles and scripts

= 0.13.8 - 2025-04-25 =
* Add - Option to enable post type archives (Sports Settings > Display)
* Fix - Error on non-numeric value in Game Player stats

= 0.13.7 - 2025-03-27 =
* Update - Game Player Stats - added total row in footer, removed zero values for better readability
* Fix - Import Tool errors

= 0.13.6 - 2024-11-27 =
* Add - Circle flags (customizable in Customizer > Sports Leagues > General)
* Add - Continents' names to countries (useful for international competitions)
* Update - Minor CSS style improvements on mobile devices
* Update - Minor UI improvements and fixes

= 0.13.5 - 2024-11-08 =
* Add - Link to player profile in Game > Players section (configurable in Customizer)
* Fix - Minor improvements

= 0.13.4 - 2024-09-18 =
* Update - Minor UI fixes
* Fix - Security fixes

[View Full Changelog](https://support.anwp.pro/knowledge-bases/12-sl-changelog/categories/72-basic-version/articles)

**Earlier versions:** See complete version history in our [changelog archive](https://support.anwp.pro/knowledge-bases/12-sl-changelog/categories/72-basic-version/articles).

== Upgrade Notice ==

= 0.13.8 =
New: Post type archive option. Fixed: Game player stats error.

= 0.13.0 =
Minimum PHP version increased to 7.0. Added date of birth format options.

= 0.12.0 =
Major admin UI improvements. New stat groups feature for player statistics.

= 0.11.0 =
New admin dashboard. Display settings moved to WordPress Customizer. Special SiteOrigin CSS integration.

= 0.10.0 =
Performance improvements with new caching system. Recommended update for all users.
