-
What can it do?
-
Free and PRO Plugin
-
Ask your Question
-
Free Plugin: Installation and basic settings
-
Free Plugin: Start with easy Examples
-
Free Plugin: settings in detail
-
PRO Plugin: Installation and basic settings
-
PRO Plugin: Basic JCI start
-
PRO Plugin: settings in detail
-
PRO Plugin: twig-Template
-
PRO Plugin: Examples
-
PRO Plugin: create Custom Post Types
-
PRO Plugin: Other Plugins
-
PRO Plugin: application building
-
PRO Plugin: Data-Formats
-
PRO: Advanced Twig
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 – 332603
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
On this page: