Quick Start (3 Steps)
Get Your API Key
Sign up at api.altsportsdata.com and copy your API key from the dashboard.
Add a Custom HTML Block
In the WordPress block editor, click "+" and search for "Custom HTML". In the Classic Editor, switch to the "Text" tab.
Paste the Widget Code
Copy the code below and paste it into the HTML block. Replace YOUR_API_KEY and YOUR_LEAGUE_ID with your values.
Widget Code Examples
Most PopularLeague Standings
<div
data-asl-widget="standings"
data-asl-league-id="YOUR_LEAGUE_ID"
data-asl-api-key="YOUR_API_KEY"
data-asl-theme="dark"
data-asl-max-items="10"
style="max-width: 100%; margin: 0 auto;"
></div>
<script src="https://widgets.altsportsleagues.ai/embed/loader.js" async></script>Live Scores
<div
data-asl-widget="live-scores"
data-asl-league-id="YOUR_LEAGUE_ID"
data-asl-api-key="YOUR_API_KEY"
data-asl-theme="dark"
data-asl-refresh-interval="30"
style="max-width: 100%; margin: 0 auto;"
></div>
<script src="https://widgets.altsportsleagues.ai/embed/loader.js" async></script>Fighter Rankings (Combat Sports)
<div
data-asl-widget="fighter-rankings"
data-asl-league-id="ufc"
data-asl-api-key="YOUR_API_KEY"
data-asl-theme="dark"
data-asl-size="standard"
style="max-width: 500px; margin: 0 auto;"
></div>
<script src="https://widgets.altsportsleagues.ai/embed/loader.js" async></script>Driver Standings (Racing)
<div
data-asl-widget="driver-standings"
data-asl-league-id="f1"
data-asl-api-key="YOUR_API_KEY"
data-asl-theme="dark"
data-asl-max-items="10"
style="max-width: 600px; margin: 0 auto;"
></div>
<script src="https://widgets.altsportsleagues.ai/embed/loader.js" async></script>Compatibility
Use the Custom HTML block
Switch to Text tab and paste
Use the HTML widget element
Use the Code Module
Use Raw HTML element
Use the HTML module
Configuration Options
| Attribute | Values | Description |
|---|---|---|
| data-asl-widget | standings, live-scores, schedule, ... | Widget type to display |
| data-asl-league-id | ufc, f1, nfl, premier-league, ... | Target league identifier |
| data-asl-api-key | Your API key | Authentication key from api.altsportsdata.com |
| data-asl-theme | light, dark, auto | Color theme (auto follows user system preference) |
| data-asl-size | compact, standard, large, responsive | Widget size preset |
| data-asl-max-items | 5, 10, 20, ... | Max items to show in lists |
| data-asl-refresh-interval | 0, 10, 30, 60, ... | Auto-refresh interval in seconds (0 = off) |
Troubleshooting
Widget not showing up?
Make sure you pasted the code in a Custom HTML block, not a regular Paragraph block. The widget needs raw HTML to render.
Script blocked by security plugin?
Some security plugins block external scripts. Add widgets.altsportsleagues.ai to your whitelist, or use the iframe embed format instead.
Widget too wide/narrow?
Add style="max-width: 500px" to the widget div, or use data-asl-size="responsive" to auto-fit.
Data not loading?
Check your API key is correct and active. Test it at api.altsportsdata.com/health. Contact support@altsportsdata.com if issues persist.