# Releasing "Twig Anything" v1.2 - display any Discourse data anywhere in WordPress

**URL:** <https://meta.discourse.org/t/releasing-twig-anything-v1-2-display-any-discourse-data-anywhere-in-wordpress/31443>\
**Category:** Marketplace\
**Created:** [26 Julio, 2015 14:00 UTC](https://meta.discourse.org/t/releasing-twig-anything-v1-2-display-any-discourse-data-anywhere-in-wordpress/31443 "2015-07-26T14:00:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [26 Julio, 2015 14:00 UTC](https://meta.discourse.org/t/releasing-twig-anything-v1-2-display-any-discourse-data-anywhere-in-wordpress/31443/1 "2015-07-26T14:00:30Z")

</div>

New version 1.2 of Twig Anything arrives!  
(read the [original announce topic](https://meta.discourse.org/t/announcing-wordpress-plugin-to-display-any-data-from-discourse/30968)).

Twig Anything is a WordPress plugin that lets you fetch any data from Discourse and display it anywhere in your WordPress blog with using shortcodes. See a nice [demo](https://twiganything.com/integrate-discourse-and-wordpress/) and an illustrated step-by-step [tutorial](https://twiganything.com/tutorial-display-data-from-discourse-in-wordpress/).

# New Features in v1.2

## 1️⃣ Official Visual Composer support

Visual Composer is a popular plugin that simplifies building complex layouts for your WordPress blogs and posts. A lot of plugins tend to play well with it. And so does Twig Anything!

In the Visual Composer editor, you will find a new block named _“Twig Anything Template”_. See [demo](https://twiganything.com/visual-composer-compatibility/)

![](https://global.discourse-cdn.com/meta/original/3X/7/7/7792eb67bc74d670d89ba57ac128985ec9dfb5ef.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/d/7/d7302aa1502463f0150467195970fb3ad0e90b15.png) 

* * *

## 2️⃣ Intelligent handling of data retrieval and parsing errors

From now on, you can control what to do if there has been a failure while fetching or parsing data. You have one of 3 options to choose from:

- **use cache or display nothing** - will try using data from out-of-date cache if it exists, otherwise display nothing (an empty string); in other words, if error will be thrown while retrieving data, an old data from cache will be used, if available, otherwise nothing will be shown. This can can happen, for example, if Discourse server is unavailable because it’s restarting after upgrade.
- **use cache or display error** - will try using data from out-of-date cache if it exists, otherwise display an error message
- **always display error** - always display an error message - might be useful while you are developing your website and there are very occasional visitors yet.

 ![](https://global.discourse-cdn.com/meta/original/3X/3/2/329f76a1f040a926270f26d2a55ecbcc00dfdbf2.png) 

* * *

## 3️⃣ Intelligent preview mode

As you know, you can preview any post before you publish it by clicking the standard WordPress’ _preview change_ button:

![](https://global.discourse-cdn.com/meta/original/3X/5/b/5b20dc5da2175992c33a5faebe09930dfea07203.png)

With Twig Anything, you can preview your templates the same way. In the preview mode, a special notice is shown, and only under it comes the rendered template:

 ![](https://global.discourse-cdn.com/meta/original/3X/6/1/617f35e48169832bdf0bd62185b5c53e1d19f9d7.png) 

As you can see from this screenshot, in the preview mode, any errors are always displayed, and the data is always retrieved from the data source and never from the cache.

* * *

Thanks for your interest!

- **Ask me any questions** in this thread

- **Access plugin** from the [twiganything.com](https://twiganything.com/) website

---

_[View the full topic](https://meta.discourse.org/t/releasing-twig-anything-v1-2-display-any-discourse-data-anywhere-in-wordpress/31443)._
