WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

JSON Content Importer

Plugin to import, cache and display a JSON-Feed / JSON-API: Connect your WordPress to an API / Webservice and display live JSON-data.

Display live data from a JSON-feed / API on your wordpress-site!

This is the answer when you ask: Why Do I Need this Plugin on my Website?

JSON Content Importer - API- and Webservice-Connector - Powerful and Simple JSON-Import Plugin:

  • Use a template engine to display the data of an JSON-Feed.
  • Define the url of the JSON-Feed, a template for it and other options like number of displayed items, cachetime etc..
  • The template engine inserts the JSON-data in the template provided in the wordpress-shortcode inside a page - whereby some extras like urlencoding can be invoked.

How to start and help

Simple Example of wordpress-shortcode

'[jsoncontentimporter

  • url="http://...json"
  • numberofdisplayeditems="number: how many items of level 1 should be displayed? display all: leave empty or set -1"
  • urlgettimeout="number: who many seconds for loading url till timeout?"
  • basenode="starting point of datasets, the base-node in the JSON-Feed where the data is"
  • oneofthesewordsmustbein="default empty, if not empty keywords spearated by ','. At least one of these keywords must be in the created text (here: text=code without html-tags)"
  • oneofthesewordsmustbeindepth="default: 1, number: where in the JSON-tree oneofthesewordsmustbein must be?"

]

Any HTML-Code plus "basenode"-datafields wrapped in "{}" {subloop:"basenode_subloop":"number of subloop-datasets to be displayed"} Any HTML-Code plus "basenode_subloop"-datafields wrapped in "{}". If JSON-data is HTML add "html" flag like "{fieldname:html}" {/subloop:"basenode_subloop"}

[/jsoncontentimporter]'

  • templates like "{subloop-array:AAAA:10}{text}{subloop:AAAA.image:10}{id}{/subloop:AAAA.image}{/subloop-array:AAAA}" are possible: one is the recursive usage of "subloop-array" and "subloop". the other is "{subloop:AAAA.image:10}" where "AAAA.image" is the path to an object. This is fine for some JSON-data.

Some special add-ons for datafields

  • "{street:purejsondata}": Default-display of a datafield is NOT HTML, but HTML-Tags are converted : use this to use really the pure data from the JSON-Feed
  • "{street:html}": Default-display of a datafield is NOT HTML: "<" etc. are converted to "&amp,lt;". Add "html" to display the HTML-Code as Code.
  • "{street:htmlAndLinefeed2htmlLinefeed}": Same as "{street:html}" plus "\n"-Linefeeds are converted to HTML-Linebreak
  • "{street:ifNotEmptyAddRight:,}": If datafield "street" is not empty, add "," right of datafield-value. allowed chars are: "a-zA-Z0-9,;_-:<>/ "
  • "{street:html,ifNotEmptyAddRight:extratext}": you can combine "html" and "ifNotEmptyAdd..." like this
  • "{street:ifNotEmptyAdd:,}": same as "ifNotEmptyAddRight"
  • "{street:ifNotEmptyAddLeft:,}": If datafield "street" is not empty, add "," left of datafield-value. allowed chars are: "a-zA-Z0-9,;_-:<>/ "
  • "{locationname:urlencode}": Insert the php-urlencoded value of the datafield "locationname". Needed when building URLs
  • "{locationname:unique}": only display the first instance of a datafield. Needed when JSON delivers data more than once

JSON Content Importer PRO

This free version of "JSON Content Importer" can put together many JSON-Feeds and is flexible with it's template-engine. But sometimes you might need more:

  • using as Widget
  • application building by creating a searchform and connect it to a JSON-API in the background: pass GET-Variables to use a dynamic JSON-Feed-URL ("talk to API / webservice")
  • usage on multisite installations
  • store Templates independent of pages
  • more Shortcode-Parameters
  • executing Shortcodes inside a template and
  • more features...

If the free version comes to your limit, I'm looking forward that you COMPARE PRO and FREE of the JSON Content Importer.

Requires: 3.0 or higher
Compatible up to: 4.7.1
Last Updated: 1 month ago
Active Installs: 1,000+

Ratings

5 out of 5 stars

Support

9 of 11 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1 100,1,1 100,2,2 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,2,2 100,1,1 100,2,2
100,1,1 100,1,1
100,1,1
100,1,1
100,2,2 100,1,1 100,1,1 100,1,1 100,2,2
100,1,1
100,1,1
100,1,1 100,1,1
100,1,1 100,1,1
100,1,1
100,1,1
100,1,1
100,1,1 100,1,1
100,1,1
100,1,1