Ultimate Guide to Building NBA Live Scores Website in WordPress

- Posted in Tutorials by

In this tutorial I will guide you through building a dynamic NBA (basketball) WordPress website with LIVE scores and helpful statistical information. You will learn how to flawlessly integrate API data import from api-sports.io, fetch and display NBA games and calendars, and provide your audience with the most up-to-date information on their favorite teams and players.

The AnWP Sports Premium WordPress plugin offers a range of benefits for your website. Some of its main advantages include:

  • automatic NBA API Data import from https://api-sports.io/
  • Bracket view for knockout stages
  • Automatic User’s Timezone (adjust the game kickoff time to the local time of the visitor)
  • Automatic Standing Table calculation with Conference and Division support
  • Page Layout Builder (with tabs)
  • Premium Gutenberg Blocks
  • Several calendar shortcode
  • Many statistical shortcodes
  • Automatic LIVE scores
  • … and many many more

Discover the power of AnWP Sports Leagues plugin by checking out our demo website:

1) WordPress Plugins

Before you begin, it is required to install the necessary plugins.

Install the AnWP Sports Leagues plugin from the WordPress repository.

Subscribe to the premium version and receive a downloadable link via email. Install it and activate using the license key from the email.

IMAGE 1

2) Data Provider – api-sports.io

You will need an API key to import data. Follow these steps:

  • Go to the API-football Dashboard.
  • Sign up if you don’t have an account, or sign in if you already have one.
  • Once signed in, click Subscription and select API NBA.
  • Choose a PRO plan, which should be sufficient for a start.

IMAGE 2

In the API Dashboard, navigate to Account (1) >> My Access (2) and copy your API Key (3).

IMAGE 3

3) API Import Setup

Before we continue, I want to confirm that you have successfully installed all the required plugins, securely copied an API key, and are fully prepared to follow the next set of instructions.

In your WordPress admin, go to the SL API Import + and click Activate under API Sports – NBA (see screenshot).

IMAGE 4

In Step 2, paste your API Key (copied from the API Dashboard) and select your Request URL (Direct Subscription in our case).

IMAGE 5

Choose what data you want to import and click the Save button.

IMAGE 6

If you plan to import Game Team Statistics, click the fix button to update the plugin settings.

You have the option to choose from default team logos or upload custom logos later on.

IMAGE 7

4) API Leagues

Upon being redirected to the API Leagues page, you will know that the necessary configurations have been set up successfully, and you can begin importing data from the API. Congrats on reaching this stage!

IMAGE 8

Click on the Database icon to create an import configuration.

IMAGE 9

Choose Run Wizard on the next step.

IMAGE 10

Then run Start Import.

IMAGE 11

It will take some time. Do not close this window until the process is complete.

IMAGE 12

IMAGE 13

If you are importing the activate season, lick the Star icon to make it available in the Dashboard. On the Dashboard page, you can easily run and schedule common tasks such as LIVE games or Update Finished Games.

IMAGE 14

Then switch to the Dashboard.

IMAGE 15

5) Schedule Automatic Updates

The plugin allows you to schedule common tasks like Update Finished Games or Update Kickoff Time. Just select tournaments and click Schedule to activate automatic tasks.

IMAGE 16

IMAGE 17

6) Live Data

If you intend to import real-time data, you can easily schedule it with the plugin, which will handle all the necessary processes for you.

Select Tournament (1) and schedule task (2).

IMAGE 18

The plugin will display real-time data on each page containing the games (as shown in the screenshot). However, there may be a slight delay of a few minutes before the data will start loading for the first time.

IMAGE 19

With the Sports League plugin, you can display a specific live layout on a single game page. You can choose which live data you want to retrieve from the API by accessing the Settings page.

IMAGE 20

IMAGE 21

7) Install WordPress Theme

AnWP Sports Leagues is compatible with almost all classic WordPress themes. However, for the best user experience, I highly recommend using the Kadence theme, which we also use in our tutorial. Its free version is lightweight, fast, and has tons of useful options.

Go to the Appearance >> Themes. Search for Kadence and click Install. Activate it.

IMAGE 22

You can optionally install Customizer settings for the Kadence theme from the demo site – https://slpro-football.anwp.pro/

Of course, if you like it.

IMAGE 23

In addition, I have a collection of step-by-step tutorials that guide you in configuring the Kadence theme like an expert.

8) Test Your Website

Check your website to see if everything works as intended.

Go to Tournaments >> and click on the View link after any competition.

IMAGE 24

9) Add to Menu (optional)

If you want to add a Tournament or Team page to the menu, go to Appearance >> Menus click on Screen Options and check Tournament or Teams to make them available in the menu section.

IMAGE 25

10) Add Widgets (optional)

AnWP Sports Leagues plugin has many cool widgets. Go to Appearance >> Widgets and select the block you want. For example, the Calendar widget will be a fine option for your sidebar.

IMAGE 26

IMAGE 27

11) Home Page, Gutenberg Blocks and Shortcodes (optional)

The plugin has dozen useful shortcodes. You will find them in Sports Leagues >> Shortcode >> Shortcode Builder.

IMAGE 28

You can also create a cool Home page using the Gutenberg Blocks plugin. SL+ Calendar Slider is a perfect choice for it.

IMAGE 29

Tutorial written by Andrei Strekozov.