Twig Anything for WordPress

Finally, a comprehensive WordPress plugin to retrieve and display JSON, CSV or MySQL data.

  • Understands JSON of any complexity
  • Fetches JSON from URLs (demo) or any data from your blog’s MySQL database (demo, tutorial)
  • Configurable CSV (comma-separated values) reader
  • Caches retrieved data locally for better performance
  • Uses expired values from cache as a fallback if data source is not available
  • Simple Twig syntax to output data (with syntax highlighting)
  • Embed it anywhere in WordPress with using shortcodes
  • Compatible with visual_composer Visual Composer (demo)
  • Integrates with discourse Discourse (demo,  tutorial 1, tutorial 2)

Step 1. Add new Twig Template

Twig Anything adds a new menu item to your administration panel – “Twig Templates”. Start by clicking on the Add New link to create a new template.

Create Twig Template

Step 2. Configure data source

Once the template editor opens, you will see data source settings. Setup where the template will fetch its data and whether it should be cached locally, e.g. to avoid multiple HTTP requests.

Data source configuration

Step 3. Edit template

Finally, enter HTML for your template and use Twig syntax to output any fields from the data you configured in step 2:

Edit output template

Click on the Preview button as usual while you are editing the template. Once finished, click on the Publish button:

Preview or publish

Step 4. Use shortcodes anywhere!

Once published, you will see the “Shortcode” panel. Click on the “copy to clipboard” link and insert the shortcode anywhere in WordPress – in posts, pages, widgets, footers etc.

Copy shortcode


See some wonderful demos or download the plugin straight away.