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

Grab JSON from an URL and convert it to HTML on a WordPress-Page

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

  • Apply a templateengine to display the data from an JSON-Feed.
  • Define the url of the JSON-Feed, a template for it and other options like number of displayed items, cachetime etc..
  • Cacher with new Choice: If a http-API request fails, y'all can apply the possibly cached JSON. Set the radio-push button in the plugins settings: what API-trouble should be handled how (either a non valid API-http-response or a non JSON-API-response – or both). By default for backwards-compatibility this is switched off. Recommendation: Switch on the plugins-cacher (e. grand. some minutes) and select the radiobutton for "If the API-http-answercode is non 200 OR sends invalid JSON: try to utilize cached JSON" in the plugins options.
  • The templateengine inserts the JSON-data in the template.
  • You can either use this as wordpress-shortcode inside a folio – whereby some extras like urlencoding tin be invoked.
  • Or use the Gutenberg Mode: And so you don't have the hassle to put an shortcode together, exam it and change it. With a Gutenberg-Block y'all can test it in realtime and create a shortcode (if you lot want to stay with shortcodes).

How to start and help

  • 2 Steps using this plugin, plus: examples and the PRO-Version.

How to example of using the plugin

Basic structure of the Shortcode:
'[jsoncontentimporter

  • url="http://…json"
  • numberofdisplayeditems="number: how many items of level one should be displayed? display all: leave empty or set -one″
  • urlgettimeout="number: who many seconds for loading url till timeout?"
  • basenode="starting point of datasets, the base of operations-node in the JSON-Feed where the information is"
  • oneofthesewordsmustbein="default empty, if non empty keywords spearated past ','. At least one of these keywords must be in the created text (here: text=lawmaking without html-tags)"
  • oneofthesewordsmustbeindepth="default: 1, number: where in the JSON-tree oneofthesewordsmustbein must exist?"
    ]
    This is the template:
    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:ten}{text}{subloop:AAAA.epitome:10}{id}{/subloop:AAAA.prototype}{/subloop-array:AAAA}" are possible:
    ane is the recursive usage of "subloop-array" and "subloop".
    the other is "{subloop:AAAA.prototype:x}" where "AAAA.epitome" is the path to an object. This is fine for some JSON-data.

Some special add together-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-brandish of a datafield is Not HTML: "<" etc. are converted to "&amp,lt;". Add together "html" to brandish 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 non empty, add "," right of datafield-value. allowed chars are: "a-zA-Z0-nine,;_-:<>/ "
  • "{street:html,ifNotEmptyAddRight:extratext}": yous can combine "html" and "ifNotEmptyAdd…" like this
  • "{street:ifNotEmptyAdd:,}": aforementioned as "ifNotEmptyAddRight"
  • "{street:ifNotEmptyAddLeft:,}": If datafield "street" is not empty, add "," left of datafield-value. allowed chars are: "a-zA-Z0-nine,;_-:<>/ "
  • "{locationname:urlencode}": Insert the php-urlencoded value of the datafield "locationname". Needed when edifice URLs

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 yous might need more:

  • 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")
  • much better and more flexible templateengine: twig
  • utilise information technology as Widget
  • create Custom Mail service Types
  • usage on multisite installations
  • store Templates contained of pages
  • more Shortcode-Parameters
  • executing Shortcodes inside a template and
  • more than features…

If the gratis version comes to your limit, I'm looking forward that y'all COMPARE PRO and Gratuitous of the JSON Content Importer.

This plugin provides 1 block.

  • JSON Content Importer FREE


For detailed installation instructions, please read the standard installation procedure for WordPress plugins.

  1. Login to your WordPress installation
  2. Install plugin by uploading json-content-importer.zippo to /wp-content/plugins/.
  3. Activate the plugin through the Plugins card.
  4. Klick on "JSON Content Importer" menuentry in the left bar: basic caching-settings and more instructions well-nigh usage.
  5. Cache binder: WP_CONTENT_DIR.'/cache/jsoncontentimporter'. Then "WP_CONTENT_DIR.'/cache/'" must be writable for the http-daemon. The plugin checks this and might aborts with an mistake-message similar dir is missing or not writeable. if so: bank check permissions of the directories.

Aid! I need more information!

Check the plugin-website!

What does this plugin do?

This plugin gives a wp-shortcode for use in a page/blog to import, cache and display JSON-data. Inside wp-shortcode some markups (and attributes like urlencode) are defined to define how to display the data.

How can I make sure the plugin works?

Run across this video and try to experiment:

Create a sample-page and use the wordpress-shortcode "jsoncontentimporter". An example is given in the plugin-configpage and in the "Clarification"-Section.
there are ii steps: . access to JSON and convert it to HTML: Pace 1: Get admission to the JSON-information and Step 2: Convert JSON to HTML.
The Pro-version comes with a installation-check pick.

Who practise I notice the proper template for my JSON?

Cheque the plugin-website!
Free-Version: If you're lost: open up ticket at wordPress.org please provide the JSON-lawmaking or link to information technology (either in the posting or in a mail to the plugin author).

Don't forget:

Donate whatever this plugin is worth for you

What does this plugin Not do?

The plugins templateengine of the free version is focused on some bones JSON-imports.
If this comes to a limit check out the pro-version: At that place y'all can utilise the twig-templatengine, create custom posts out of JSON and many other features.
Your options if this plugin does not piece of work:

  • use right lawmaking for this plugin 😉
  • if the above is ok, change the JSON-Input
  • open up ticket at wordPress.org provide the JSON-code there or an electronic mail to the plugin-writer.
  • Check the pro-plugin!

Where is this plugin from?

This plugin is made in munich, bavaria, germany!
Famous for Oktoberfest, FC Bayern Munich, AllianzArena, DLD, TUM, BMW, Siemens, seas, mountains and much more…

I searched exactly for this plugin, very useful and the tutorial video is very understandable !! Thanks a lot @berkux ! One of best plugins ever !!!

This is the merely game in town if you desire a WordPress Plugin which displays a JSON feed on your website. Easy to employ and excellent support from Bernhard!

Yes, you need to devote some fourth dimension to learning how to use the plugin but and so it opens a whole new world of possibilities for many website owners. Bernhard is very helpful. And as far as I know, in that location is no alternative plugin with the same functionality. The only culling would be working directly with APIs. "Highly recommended" is the least I tin can say.

First-class gratuitous options in the plugin, quick support.

Information technology works not bad for my apply-example. Information technology's confusing at offset, merely once yous get the syntax down, it's super easy to use.

Followed the video, claims json is in the widget area after activation, nope! so how do you lot employ it...

Read all 63 reviews

"JSON Content Importer" is open up source software. The following people accept contributed to this plugin.

Contributors

  • berkux

one.iii.xiii

  • Added sslverify-switch in the plugins general options: If a https-certificate is suddenly invalid, try to switch off information technology'southward verification (not ideal, but pragmatic)
  • Some improvements for debug-infos (e. g. add debugmode=10 to the shortcode)
  • Plugin Ok with WP v.8.ane

i.3.12

  • Importaint speed-up Bugfix for JCI-Gutenberg-Block! If you run your WordPress with Gutenberg-Blocks (no ClassicEditor-Plugin active) several unneeded libraries are loaded (independend of using a JCI-Block or non). This slows the site and gives bad load-ratings due east. thou. at Googles Pagespeed ( https://developers.google.com/speed/pagespeed/ ). With this fix the unneeded libraries are not loaded any more and the load-rating should be better.
  • Background-Bank check for allow_url_fopen in Plugin Options: If allow_url_fopen is not set to Truthful in the PHP-Settings, this might prevent PHP and the plugin to become JSON via http-requests from remote servers (if there no crimson text, all is ok)
  • Plugin Ok with WP v.6.i

1.3.11

  • Internationalization added: Available languages are English language, German. Feel complimentary to add other languages!
  • Shotcodeparam nojsonvalue: If "nojsonvalue=y" the API-Reply is available every bit {nojsonvalue}, helpful if the API answer is non JSON
  • Plugin Ok with WP 5.6

ane.3.ten

  • Bugfix if subloop's have several unreplaced {…} items
  • Plugin Ok with WP 5.five.1

1.3.nine

  • Bugfix if a JSON-field is not always at that place or nil (loop stopped if so)
  • Placeholders for template: If you want to have curly or square brackets {}[] in the template, this can trouble the shortcode-syntax or the template-parser. Apply the placeholders #CBO# (curly brackets open), #CBC# (curly brackets close), #SBO# (square brackets open up) and #SBC# (square brackets shut) in the template, the placeholders will be replaced by it's bracket-values in the stop after parsing.
  • Plugin ok with WP 5.4.2

1.three.8

Compatibility fix: Plugin is now Ok with PHP seven.iv

1.3.7

  • New Choice: If a http-API request fails, you tin can use the perhaps cached JSON. Set up the radio-button in the plugins settings: what API-trouble should be handled how (either a non valid API-http-response or a not JSON-API-response – or both). By default for backwards-compatibility this is switched off. Recommendation: Switch on the plugins-cacher (east. one thousand. some minutes) and select the radiobutton for "If the API-http-answercode is not 200 OR sends invalid JSON: try to use cached JSON" in the plugins options.

i.3.six

  • Bugfix: Add Gutenberg-JS merely in the backend (before it was also in the frontend)

1.iii.5

  • New: Added a Quicktag to the WordPress-Text-Editor to insert the JSONContentImporter-Shortcode incl. an example

1.3.4

  • New Plugin-Pick: Switch off Gutenberg features (mayhap a site builder needs that)

1.iii.iii

  • Bugfix of Bugfix, sorry…

1.three.two

  • Bugfixes: notice Gutenberg and WordPress 5.0

i.3.1

  • Bugfixes

i.iii.0

  • Plugin is ok with the Gutenberg Plugin 3.9.0
  • Gutenberg-Mode: With an agile Gutenberg Plugin you get an easy instance for testing and learing how to use the plugin. If you don't want to apply Gutenberg on live-stage: Utilise it to easy create the shortcode (almost avoid the learning of the shortcode-parameter-syntax)

1.2.20

  • Plugin is ok with WordPress 4.ix.8
  • Plugin is ok with the Gutenberg Plugin 3.vi.2
  • Plugin is ok with the General Data Protection Regulation (GDPR): The plugin does not collect personal data itself. Y'all may list the plugin in your GDPR-documentation as used software. Possibly the used API uses personal data – and so yous accept to have care of the GDPR.
  • Improved debugmode (use debugmode=x in the shortcode for that)
  • Changed the Videolink to a meliorate HowTo-Video
  • Added upgradelink to pro plugin in PluginList

1.2.nineteen

  • Plugin is ok with WordPress 4.ix.1
  • Adding "debugmode=10" to the Shortcode parameters will show you info most the API-JSON-retrieve and the used template for converting to HTML.
  • Ever since the plugin uses the PHP function "mb_check_encoding" to observe a peradventure needed graphic symbol-conversion. Unfortunately some WordPress/PHP-installations exercise not have the PHP-optional "Multibyte String"-library required for that. Then the plugin does not work. Now the availablility of "mb_check_encoding" is checked: If information technology'S not there the conversion-feature is disabled.
  • At the Plugin-options you can set a "Bearer"-accesskey for oAuth-Bearer-Authentication. The at that place divers accesskey-string is sent to the API as "Potency:Bearer accesskey". Some APIs just demand "Authorisation:accesskey". Then "Bearer " should not sent. To do this add together "nobearer " (with one space at the end) at the beginning of the selection-field.

one.2.18

  • Plugin is ok with WordPress 4.7.five
  • New selection: Add Default Useragent for http-asking (some APIs need that)

ane.2.17

  • Plugin is ok with WordPress 4.7
  • https instead of http for Plugin-Website
  • Remove invalid quotation marks in shortcode-attributes (when copypasting instance code this can happen)

1.two.16

  • Plugin is ok with WordPress iv.half-dozen.ane
  • Plugin is ok with PHP 7.0
  • Cleaner Lawmaking

1.2.15

  • Plugin is ok with WordPress 4.5.two
  • Added features for coming future addons

1.2.xiv

  • Plugin is ok with WordPress iv.5
  • Improved description

one.2.thirteen

  • Caching-Bug Fixed: WordPress 4.iv.2 does not create a "/cache/" folder. If "/enshroud/" is missing, the plugin creates on. This is relevant for totally new WordPress installations, as older ones should accept such a directory.

1.2.12

  • Plugin is ok with WordPress 4.4
  • modest change: prevent direct calls of plugin
  • bug fixed: path of cached files is now set ok

one.2.11

  • bugfix: issues with numeric JSON-values and field manipulators like {JSONkey:ifNotEmptyAdd:….}
  • beta feature Vers. 0.2: Fixed bug in using oAuth-Bearer-Accesscode for authentification at JSON-Server: Bearer-Code is added to the Asking-Header.

1.2.x

  • bugfix: caching now works even with very long URLs
  • beta feature: On the Optionpage yous can prepare an oAuth-Bearer-Accesscode for authentification at JSON-Server: This Bearer-Code is added to the Request-Header.

1.ii.9

  • new: "{street:purejsondata}": Default-display of a datafield is NOT HTML, but HTML-Tags are converted. If you desire to use really the pure information from the JSON-Feed, add together ":purejsondata". Try commencement {street}, then {street:html} and then {street:purejsondata}. In some cases: Take intendance that "meta http-equiv=content-blazon…" is set up to "utf-viii"

1.2.8

  • bugfix: handling of JSON-values with $

1.2.seven

  • WordPress 4.3.1: bank check – all ok
  • bugfix: correct encoding of spaces when using {FIELD:html}
  • bugfix: deleting unfilled template-items containing dots

1.two.half-dozen

  • WordPress four.3: check – all ok
  • added feature: remove unfilled template-placeholders {…}
  • introducing "JSON Content Importer PRO"

i.2.5

  • WordPress 4.2.3: check
  • minor bugfix regarding attribute "ifNotEmptyAddRight"
  • new Pluginwebsite: http://json-content-importer.com/

1.2.iv

  • "&" in JSON-Feed-URLs are replaced by "&"

1.2.three

  • added a donated feature: new shortcode-params "oneofthesewordsmustnotbein", "oneofthesewordsmustnotbeindepth". This is for excluding JSON-data from display: When one of the ","-separated keywords at "oneofthesewordsmustnotbein" is found in the textblock, ignore this textblock

1.ii.2

  • modest bugfix: JSON-Structures like { "$a": "$b"} tin be handled (before: "$" fabricated bug)

1.2.1

  • new feature "{street:htmlAndLinefeed2htmlLinefeed}": Text-Linefeeds of JSON-information are converted to HTML-Linefeeds
  • Boolean JSON-Values were ignored before this version. Now the text "true" or "False" is displayed
  • Bugfixing Cacher: Timeout-Parameter of enshroud was non handled right
  • Stock-still a issues with JSON-Value containing "$"

1.2.0

  • new shortcode-parameter: "oneofthesewordsmustbein" and "oneofthesewordsmustbeindepth"
  • filter & hook for third party extensions added: hook "json_content_importer_extension" and filter "json_content_importer_result_root"
  • Sourcecode: Classes rearranged
  • small bugfix: number of items in subloop/subloop-array was sometimes ignored and all was displayed
  • "made in munich" added (come across faq)

1.1.2

  • Bugfix: tags similar "{aa/aa}" are ok (previous: error)
  • Display JSON-HTML-Data really as HTML. Default: JSON-HTML-Data is displayed not as HTML but as HTML-Text. New in this version: tag-sytax like "{tag:html}" or "{street:html,ifNotEmptyAddRight:extratext}" allows real HTML-display.
  • New parameter in "[jsoncontentimporter]"-shortcode: prepare http-timeout "urlgettimeout". default is five seconds (ueful if source-website of JSON is wearisome)
  • Logo of plugin: WordPress-Logo inserted
  • Update of screenshots

1.1.1

Bugfixes

1.ane.0

Completely rewritten template engine for fifty-fifty better JSON-handling:

  • "subloop-assortment": key should also be in the endmost tag, east.thousand. "{subloop-array:KEY:10}{some_array_field}{/subloop-array:Primal}".
    The "subloop-assortment" without Central in the closing tag is ok if in that location is only i "subloop-array" in the template. But if there are more than 1 "subloop-assortment" in the template insert the Fundamental in the endmost tag!
    Then the template engine tin can place the correct JSON-data.

  • "subloop": what is above for "subloop-array" is also for "subloop", e.grand. "{subloop:KEY:10}{some_object_field}{/subloop:KEY}"

  • templates similar "{subloop-array:AAAA:10}{text}{subloop:AAAA.image:ten}{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.paradigm" is the path to an object.

  • JSON-information with multiple use of arrays tin exist handled past the template engine

1.0.5

  • Added Screenshots
  • Enhanced "subloop-assortment", new processing of pure string/numeric-array data (earlier: but string/numeric-information in an object)
  • Enhanced FAQs: Added Link to Website for better creating shortcode-markups

1.0.4

Bugfixes

1.0.3

Enhanced the template engine for better JSON-handling.

1.0.two

Initial release on WordPress.org. Whatsoever comments and characteristic-requests are welcome: blog@kux.de