Sports Reference Blog

Embed Play Index Queries on Your Website

Posted by Jonah Gardner on September 23, 2016

We're continuing to add features to our newly redesigned sites, and we have a very exciting one to share with you today, especially for those of you who have your own website.

Previously, we've had tools that give you the option to embed tables like standings and leaderboards on your website. That option is still around, but we've improved on it. If you hover over "Share & More", the second option you'll see is "Embed This Table."

screen-shot-2016-09-23-at-3-11-59-pm

That option is now on all tables. Additionally, if you click on that, you'll see one of the new features we've added is the ability to designate a maximum number of rows to display. At the end of the long src="..." code, you can add the text "&max_rows=X". Doing so will mean that your widget will only display X number of rows.

screen-shot-2016-09-23-at-3-34-42-pm

Practically, what this means is that you can now embed Play Index queries on your website, without accidentally adding 100s and 100s of rows, and have them update live throughout the season. So, if you want to add the 10 best games by a running back this year or check if the Warriors are pushing for one of the best Offensive Ratings since 1973, you can embed those tables directly on your website! Just copy the code and let us do the work of updating the stats for you every day!

Comments are closed.