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: See it in action: The Block settings for that:

API: trustatrader.com

Request via wordpress.org: “no feed coming through” Question: “Can’t get raw data from this feed to show up at all. Not sure what I am missing: https://www.trustatrader.com/api/consumer-reviews?username=CWYAONE&format=json“ I saved this JSON to http://api.json-content-importer.com/extra/json/blog/trustatrader_com.json to have this example independent from external sites.

Free Plugin: api.wordpress.org/events

With http://api.wordpress.org/events/1.0/?latitude=47.496&longitude=8.226 you can display the next WordPress-Events arround a geoposition. This can be displayed with the free plugin this way: Create a new page with Gutenberg active (or WordPress 5.0). Insert the above URL into the Blocks API-URL. The “basenode” is “events”.The template is: Screenshot of the Block-Settings: Example in Action: Additional set “Number … Continue reading “Free Plugin: api.wordpress.org/events”

API: technolife.ir

Challenge: Display data from https://www.technolife.ir/service/get/mobile Solution: [jsoncontentimporter url=http://api.json-content-importer.com/extra/json/technolife-ir.json] {subloop-array:products:-1} {subloop:products.item:-1} <img src={products.item.field_image} align=left> {products.item.title}: {products.item.price_field}<br clear=all><hr> {/subloop:products.item} {/subloop-array:products} [/jsoncontentimporter] In action:

API: curated.co

Task: Get data from curated.co via it’s API Solution: Get your API-KEY and your PUBLICATION_KEY You need the PRO-Version of the JSON Content Importer-Plugin After installing the plugin in your WordPress add this to a page: [jsoncontentimporterpro url=https://api.curated.co/PUBLICATION_KEY/api/v1/issue method=curlget method=curlget curloptions=’CURLOPT_HTTPHEADER=Accept:application/json##Authorization:Token token=YOUR_API_KEY##Content-type:application/json’ parser=twig] issues: {{issues|length}} {% for i in issues %} {{i.published_at}}: title: {{i.title}} {% … Continue reading “API: curated.co”

API: stanleystella.com

Challenge: Get data from api.stanleystella.com Solution: You need the PRO-Version of the plugin Create a new template in the plugins template-manager. There set this up: – twig-code: {% for r in result %}{{r.Type}}: {{r.HTMLPath}}{% endfor %} – unique name, e.g. “stanleystella” – URL: https://api.stanleystella.com/webrequest/products_images/get_json – set “CURL-POST” – Curloptions: CURLOPT_RETURNTRANSFER=1;CURLOPT_SSL_VERIFYHOST=0;CURLOPT_SSL_VERIFYPEER=0;CURLOPT_POST=1;CURLOPT_POSTFIELDS={ “jsonrpc” : “2.0”, “method” : … Continue reading “API: stanleystella.com”