Print

Free: API wordpress.org

Challenge

WordPress.org has an API that provides data on each WordPress plugin: listing how often it’s been downloaded, how well it’s rated, etc. We can fetch any such API and display its results on our page. The API for the JCI Plugin is at https://api.wordpress.org/plugins/info/1.0/json-content-importer.json.

Code

This shortcode loads data from the above link, converts it into HTML, and shows the data:

[jsoncontentimporter url=https://api.wordpress.org/plugins/info/1.0/json-content-importer.json]
Version: {version} - {downloaded} 
Downloads - {num_ratings} Ratings: {rating}%
[/jsoncontentimporter]
Result

The live result is below:


Version: 1.6.1 – 336219
Downloads – 73 Ratings: 98%

Was this article helpful?
4.5 out Of 5 Stars

2 ratings

5 Stars 0%
4 Stars 100%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
On this page: