New version 1.2 of Twig Anything arrives!
(read the original announce topic).
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 and an illustrated step-by-step tutorial.
New Features in v1.2
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
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.
Intelligent preview mode
As you know, you can preview any post before you publish it by clicking the standard WordPress’ preview change button:
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:
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 website