Print

Free: Getting Started

The free version of the JCI Plugin comes with a sample JSON feed to demonstrate the essential functions.
After installing the plugin, open the following URL in your browser:


[YOURDOMAIN]/wp-content/plugins/json-content-importer/json/gutenbergblockexample1.json

You should immediately see a JSON file that looks like the one here:
https://doc.json-content-importer.com/wp-content/plugins/json-content-importer/json/gutenbergblockexample1.json

Now try the following shortcode on any of your ordinary WordPress pages:

[jsoncontentimporter url=https://doc.json-content-importer.com/wp-content/plugins/json-content-importer/json/gutenbergblockexample1.json basenode=level1]
{start}
[/jsoncontentimporter]

That code will fetch the JSON file from this documentation website and display a specific node on your page. The green box below shows what that shortcode displays when the plugin is correctly installed.

Initial Success


Very good, this is the value of 'start', right out of the JSON-data

Additional Information

Adding debugmode=10 to the shortcode will display:

  • If caching is on
  • Which URL was entered for the JSON file
  • The API answer
  • The retrieved JSON structure
  • Which template was used
  • The combined result of the JSON and the template

Below is the shortcode used on the same JSON file but with debugging information:

DEBUG: Cache is NOT active
DEBUG: try to retieve this url: https://doc.json-content-importer.com/wp-content/plugins/json-content-importer/json/gutenbergblockexample1.json
DEBUG: wp_safe_remote_get to https://doc.json-content-importer.com/wp-content/plugins/json-content-importer/json/gutenbergblockexample1.json
DEBUG: arguments: Array ( [timeout] => 5 )
DEBUG: success getting URL

DEBUG: api-answer:
Inspect JSON: Copypaste (click in box, Strg-A marks all, then insert into clipboard) the JSON from the following box to https://jsoneditoronline.org):

DEBUG: basenode: level1
DEBUG: template:

DEBUG:
LEAVE function checkType // depth: 1 // result: Very good, this is the value of 'start', right out of the JSON-data
// returnHTMLinsideProc: Very good, this is the value of 'start', right out of the JSON-data

DEBUG: result:

Very good, this is the value of 'start', right out of the JSON-data

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
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: