Integrating the Play-Cricket API with WordPress

Last updated: 11/07/2025

For years, I was aware of the Play-Cricket API but had never managed to integrate it with Lowerhouse’s WordPress backend.
Thanks to some help from AI, I’ve now developed WordPress plugins for the most relevant endpoints β€” and I’ll continue to build on this post as things evolve.

If you have any questions, I’ll do my best to help. Email me at adam@lowerhousecc.com.


Getting Started with the Play-Cricket API


πŸ“Š WordPress Plugin: League Table (Dynamic)

See the plugin in action on this page.

πŸ‘‰ Download the plugin here

Inside the ZIP, you’ll find a .php file. Open it and locate the line:

$api_token = 'ENTER YOUR TOKEN HERE';

Replace 'ENTER YOUR TOKEN HERE' with your API token from Play-Cricket (keep the single quotes).

πŸ”§ Installation Instructions

  1. Go to your WordPress dashboard.
  2. Navigate to Plugins > Add New > Upload Plugin.
  3. Select the ZIP file and click Install Now.
  4. Activate the plugin from your Plugins page.

πŸ§ͺ How to Use

Insert the following shortcode into any post or page:

πŸ“Œ Replace the number with your own Division ID. You can find this at the end of any Play-Cricket division URL.

Example: https://lancashireleague.play-cricket.com/website/division/125481 β†’ Division ID is 125481

League Table Plugin Example

Save your post or page, and the league table will display.


πŸ“‹ WordPress Plugin: Result Summary

See it in action on this page.

πŸ‘‰ Download the plugin here

Inside the ZIP, open the .php file and locate these two lines:

$api_token = 'ENTER YOUR TOKEN HERE';
$default_site_id = 'ENTER YOUR SITE ID HERE';

Replace the placeholders with your API token and site ID. Your site ID can be found in the footer of your club’s Play-Cricket homepage. Lowerhouse’s is 4418.

Play-Cricket site ID example

πŸ”§ Installation Instructions

  1. Go to your WordPress dashboard.
  2. Navigate to Plugins > Add New > Upload Plugin.
  3. Select the ZIP file and click Install Now.
  4. Activate the plugin from your Plugins page.

πŸ§ͺ How to Use

Insert the following shortcode into any post or page:

πŸ“Œ Replace the division_id and dates with your desired values.

Result Summary shortcode and result output

Save your post or page, and the results summary will appear.


πŸ“„ WordPress Plugin: Match Detail

See the plugin in action on this page.

πŸ‘‰ Download the plugin here

Inside the ZIP, open the .php file and locate the line:

$api_token = 'ENTER YOUR TOKEN HERE';

Replace it with your actual Play-Cricket API token.

πŸ”§ Installation Instructions

  1. Go to your WordPress dashboard.
  2. Navigate to Plugins > Add New > Upload Plugin.
  3. Select the ZIP file and click Install Now.
  4. Activate the plugin from your Plugins page.

πŸ§ͺ How to Use

Insert the following shortcode into any post or page:

πŸ“Œ Replace the match ID with the number at the end of the URL of any result page on Play-Cricket.

Example: https://lowerhouse.play-cricket.com/website/results/6685732 β†’ Match ID is 6685732

Match Detail Plugin Example

Save your post or page, and the match details will display.