Support center

Calendar in Wordpress

Events that are approved by the agency can be retrieved from an API. The JSON Content Importer plugin for Wordpress can retrieve this data and display it in a page. By using a template you can format the output.

Event API access

Make sure you have the URL to the API of your agency in JSON format.

Installing the plugin

Install the JSON Content Importer plugin in Wordpress and go to the settings of the plugin. 

Make sure you "Enable Cache" and set the "reload json from web if cachefile is older than" to 60 minutes.

Using the plugin

First switch the Wordpress editor from "Visual" to "Text" mode. 

Paste our shortcode example into the editor and preview your changes. You should see a list with events appear.

[jsoncontentimporter url="" basenode="data"]<b>{subloop:date:-1}{day} {monthName} {year}{/subloop:date}</b>
{subloop:production:-1}{name}{/subloop:production} - {subloop:artist:-1}{name}{/subloop:artist}
{subloop:venue:-1}{name}, {city}{/subloop:venue}

If you take a closer look at our example, you can see that it uses the [jsoncontentimporter][/jsoncontentimporter] shortcode, with the following parameters:

Between the [jsoncontentimporter][/jsoncontentimporter] you can find the template, which is used to format the output. You can use a mix of HTML and template tags to format your output.

The plugin uses the notation {subloop:artists:-1}{name}{/subloop:artist} to access the childnode "name" of the of "artist" node.


If you have questions about the use of the Wordpress plugin, please consult their documentation.

Related articles