Twig Anything – Show any data from Discourse in Wordpress – an Open Source WordPress plugin

A piece of feedback from the former support forum:


I don’t see any way to download this plugin, only a button to buy it for USD 59. What is the status of this plugin now?

1 Like

There’s a link to a BitBucket repository above — please download it from there. Just got no time to update the website yet.

1 Like

Is it possible to manipulate data from the JSON?

For example, using the Events Plugin from @angus to add topic.event.start which is in UTC format:


Could we easily convert to a human-readable format in a set time zone?

Data can be manipulated by using features of the Twig template language: Documentation - Twig - The flexible, fast, and secure PHP template engine

Where’s the best place to file bugs with the plugin?

As they are rare, I think it’s okay if you report them just here in this thread. Thanks.

Hi Anton, I’m trying to use Twig Anything (we purchased it today by the way) and am trying to use the wp_get_current_user_id() inside an SQL query - coming up with “Failed preparing MySQL query: The function “wp_get_current_user_id” does not exist. Did you mean “wp_get_current_user”, “get_current_blog_id”, “get_current_user_meta” in “template” at line 1”. In other words, it’s not finding the function I’m trying to use. Is that something that needs to be updated in the plugin?

Sorry - let me clarify the above (it’s long!) - getting the error: “The function “wp_get_current_user_id” does not exist.” when attempting to call {{ wp_get_current_user_id() }} through Twig Anything.


is this plugin still supported ?
and is it possible to have this data also trough this plugin:

I’m using the plugin on my own websites, and it is working okay, but I haven’t been developing new features for a while.

The plugin has been open sourced some time ago, so feel free to give it a try.

Contributions are welcome.


Why doesn’t the demo(s) work?
Is the plugin okay?
Can the plugin be used with other csm’s but not only with wordpress?

Which demos do you mean?

Yes, I’m using it on a website with 100k+ visits per month.

It’s a WordPress plugin, so no other CMS.

I think his issue is the new Guttenberg editor breaks the forms and as such the plugin no longer functions.
Shame I only just found this as there appears to only be one other plugin like this.

Thanks for reporting. A PR is welcome! :wink:

1 Like

Can I create something like additional field/excerpt and export it as an JSON ?

that is, for example instead of the whole post i would like to have content that is in a new separate field ?
button -> create new topic

Type title:
Custom field: —> json

If you can retrieve the data needed with a SQL query through Data Explorer plugin, then you can read it as JSON with this plugin as well.

Not sure if you’re still maintaining this plugin, but I submitted a PR to support the header-based API authentication required in 2.5


Hello @meglio ,
can you export discourse data and import to wordpress?

I opensourced the plugin and stopped working on it because if the lack of interest from people.

Not sure the current state of the plugin, but it used to be able to do that.

1 Like