Free Plugin with JSON-example

One user asked for hints on using a JSON like this. The solution is quite simple:

Install the free JSON Content Importer Plugin and use this Shortcode:

[jsoncontentimporter url= basenode=consumer_reviews_api]{subloop:params:-1}
params: {params.username}
trader: {trader.company_name}
review: {reviews.comments}<br>

See it in action:

The Block settings for that:

How to: urlparam4twig

You can define a urlparam4twig-list like “one#two” via the shortcode “urlparam4twig ” or (preferrably) the plugin-template.

This gives you the most flexible way to put a dynamic URL together for the API-call.

Create a template with this twig-code:

this is a template: <br>
time: {{ "now"|date("m.d.Y") }}<br>
urlparam "one": {{}}<br>
urlparam "two": {{urlparam.two}}

URL:{{ "now"|date("mdY") }}&a={{}}&b={{urlparam.two}}



Save this template and remember the no of the template, use this shortcode:

[jsoncontentimporterpro id=ID_OF_TEMPLATE]

Click here and see the change in the following paragraph. You might change the values for the parameters.
In the back the twig code in the URL is executed and the values for “one” and “two” are used.

this is a template:
time: 10.19.2019
urlparam "one":
urlparam "two":


Via the question came in on how to use… (see also here) with the free plugin.

Here we go:

[jsoncontentimporter url= numberofdisplayeditems=-1 basenode=tank]
fish: {subloop-array:fish:-1}quantity: {fish.quantity}<br>{/subloop-array:fish}
plants: {subloop-array:plants:-1}species: {plants.species}<br>{/subloop-array:plants}

If you use the pro plugin this is the twig-template for that:

Continue reading “API:”

API: – Sorting, Bearer

A request asked me, how to display data from the API sorted. One thing here is how to get access to the data. The other how to display that data.

Authentication at
What the API expects is described here. At the free plugin you can set the API_KEY at the plugin setup. The free plugin can’t sort the json-data, but together with the Plugin TableSorter a sortable Table is possible, see here.

Authorization: Bearer API_KEY

With the pro plugin it’s like this:
Create a new pro plugin template with the following settings.
The “curloptions” set the http-header. “sortbyjsonfield” sorts for the latitude-values. When saving the template you get a TEMPLATE_ID of this template:

{% for i in properties | sortbyjsonfield("latitude,desc,num") %}
latitude: {{i.latitude}}, postal_code: {{i.postal_code}}<br>
{% endfor %}




Use the new TEMPLATE_ID in the shortcode on a page or post:

[jsoncontentimporterpro  id=TEMPLATE_ID]


Request via “no feed coming through”

Question: “Can’t get raw data from this feed to show up at all. Not sure what I am missing:

I saved this JSON to to have this example independent from external sites.

Continue reading “API:”