Live Sports
Comprehensive sports widgets powered by TheSportsDB API - Live scores, standings, fixtures, player stats and more for NFL, NBA, MLB, NHL, Soccer and other sports.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/mo-sawah/live-sports/archive/refs/heads/main.zipLive Sports - WordPress Plugin
Website: https://sawahsolutions.com
Requires: WordPress 5.0+
License: GPL v2 or later
📋 Description
Live Sports is a comprehensive WordPress plugin that brings real-time sports data to your website. Powered by TheSportsDB API, it provides beautiful widgets for live scores, standings, fixtures, team profiles, and player statistics across multiple sports including NFL, NBA, MLB, NHL, Soccer, and more.
✨ Features
🎯 Core Features
- Live Scores Widget - Real-time match scores with 2-minute updates
- Standings Widget - Complete league tables with team rankings
- Fixtures Widget - Upcoming match schedules
- Team Profile Widget - Detailed team information and stats
- Top Scorers Widget - League scoring leaders
💪 Additional Features
- Multi-sport support (Soccer, Basketball, Football, Baseball, Hockey, etc.)
- Responsive design for all devices
- Auto-refresh functionality for live data
- Beautiful, modern UI
- Easy-to-use widgets and shortcodes
- Caching for optimal performance
- Comprehensive admin settings
📦 Installation
Method 1: Upload via WordPress Admin
- Download the plugin ZIP file
- Go to WordPress Admin → Plugins → Add New
- Click "Upload Plugin"
- Choose the ZIP file and click "Install Now"
- Activate the plugin
Method 2: Manual Installation
- Download and extract the plugin files
- Upload the
live-sportsfolder to/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
Method 3: FTP Upload
- Extract the plugin files
- Upload via FTP to
/wp-content/plugins/live-sports/ - Activate through WordPress admin
🔧 Configuration
1. Get API Key (Optional but Recommended)
- Visit TheSportsDB
- Subscribe for $9/month to get premium features
- Copy your API key
2. Configure Plugin
- Go to Settings → Live Sports
- Enter your API key (or leave empty for free test key)
- Set cache duration (120 seconds recommended for premium)
- Choose default sport
- Click "Save Settings"
🎨 Usage
Using Widgets
- Go to Appearance → Widgets
- Find Live Sports widgets in the available widgets list
- Drag to your desired sidebar/widget area
- Configure widget settings
- Save
Using Shortcodes
Live Scores
[live_sports_scores league="4328" sport="Soccer"]
Standings
[live_sports_standings league="4328" season="2024-2025"]
Fixtures
[live_sports_fixtures league="4328" limit="10"]
Team Profile
[live_sports_team team_id="133602"]
Top Scorers
[live_sports_scorers league="4328" limit="10"]
📊 Popular League IDs
Soccer/Football
- 4328 - English Premier League
- 4335 - Spanish La Liga
- 4332 - Italian Serie A
- 4331 - German Bundesliga
- 4334 - French Ligue 1
- 4480 - UEFA Champions League
- 4481 - UEFA Europa League
American Sports
- 4391 - NFL (National Football League)
- 4387 - NBA (National Basketball Association)
- 4424 - MLB (Major League Baseball)
- 4380 - NHL (National Hockey League)
🎯 Widget Configuration
Live Scores Widget
Settings:
- Title: Widget title
- Sport: Choose sport type
- Auto-refresh: Enable/disable 2-minute refresh
Features:
- Real-time score updates
- Live match indicator
- Team badges
- Match status
Standings Widget
Settings:
- Title: Widget title
- League: Select from popular leagues
- Season: Format YYYY-YYYY
- Max teams: Number of teams to display
- Show form: Display last 5 match results
Features:
- Complete league table
- Win/Draw/Loss stats
- Goal difference
- Points
- Form indicators (W/D/L)
- Position highlights (Champions League, Relegation)
Fixtures Widget
Settings:
- Title: Widget title
- League: Select league
- Type: Upcoming or past matches
- Limit: Number of fixtures to show
Features:
- Match schedule
- Date and time
- Venue information
- Team badges
Team Profile Widget
Settings:
- Title: Widget title
- Team ID or name: Team to display
Features:
- Team badge
- Stadium information
- Founded year
- League information
- Team description
Top Scorers Widget
Settings:
- Title: Widget title
- League: Select league
- Limit: Number of players to show
Features:
- Player rankings
- Goal count
- Team affiliation
- Gold/Silver/Bronze medals for top 3
🔄 API Key Limits
Free Test Key (123)
- Limited endpoints
- No live scores
- Basic data only
- Rate limited
Premium Key ($9/month)
- 2-minute live scores
- All endpoints
- Video highlights
- Event statistics
- Extended data limits
🎨 Customization
Custom CSS
Add custom CSS in your theme:
/* Change widget background */
.live-sports-widget {
background: your-color;
}
/* Customize team names */
.team-name {
font-size: 16px;
color: your-color;
}
/* Style live indicator */
.live-dot {
background-color: your-color;
}
Filters and Hooks
Available filters:
live_sports_api_key- Filter API keylive_sports_cache_duration- Filter cache durationlive_sports_widget_title- Filter widget titles
📱 Responsive Design
All widgets are fully responsive and work on:
- Desktop computers
- Tablets
- Mobile phones
- All screen sizes
⚡ Performance
Caching
- API responses are cached using WordPress transients
- Default cache: 120 seconds (2 minutes)
- Adjustable in settings
- Automatic cache clearing on deactivation
Optimization
- Minimal JavaScript
- Optimized CSS
- Efficient AJAX for live updates
- No external dependencies
🐛 Troubleshooting
Live Scores Not Working
- Check if you have a premium API key
- Verify API key in settings
- Check if league has live matches
Standings Not Loading
- Verify league ID is correct
- Check season format (YYYY-YYYY)
- Ensure cache is not corrupted
Images Not Displaying
- Check internet connection
- Verify TheSportsDB is accessible
- Check for ad blockers
Clear Cache
Go to Settings → Live Sports and save settings to clear all cached data.
📞 Support
- Documentation: https://sawahsolutions.com
- TheSportsDB API Docs: https://www.thesportsdb.com/documentation
- WordPress Support: https://wordpress.org/support/
🔐 Privacy & Security
- No personal data collected
- Only sports data from TheSportsDB
- Secure API communication
- No cookies used
- GDPR compliant
📝 Changelog
Version 1.0.0 (2025)
- Initial release
- Live Scores widget
- Standings widget
- Fixtures widget
- Team Profile widget
- Top Scorers widget
- Admin settings panel
- Shortcode support
- Auto-refresh functionality
- Responsive design
- Multi-sport support
🤝 Credits
- TheSportsDB - Sports data provider
- Mohamed Sawah - Plugin development
- Sawah Solutions - https://sawahsolutions.com
📜 License
This plugin is licensed under GPL v2 or later.
Copyright (C) 2025 Mohamed Sawah
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
🚀 Future Updates
Planned features for future versions:
- Match statistics widget
- Player comparison tool
- Match predictions
- Historical data archive
- More sports coverage
- Advanced filtering options
- Export functionality
- API rate limiting monitor
Made with ❤️ by Mohamed Sawah
Visit: https://sawahsolutions.com