How to embed full topic list (i.e., my main Discourse page) on WP site?


(AaronWebstey) #1

I can’t seem to find instructions for anything other than using Discourse as a comment engine for WP. I do want to do this, but I also would like to have my main discussion list embedded in the site.

E.g., my current forum is at http://forum.trstriathlon.com. I want to have a WP menu item that says ‘Forum’, and when you click it, you see my main discourse forum page, embedded in a regular page on the site.

I feel like a complete idiot, as it seems like there should be some obvious way to do this. Anyone?

Discourse looks completely, head and shoulders above other forums. I would so love to be able to do this.

Thanks!


(Anton) #2

Hi @Webstey. One of the possible options is using the Twig Anything plugin for wordpress.

It can read Discourse API to get the same list of topics found on your main discourse page. You would then use HTML to format the list the way you need it.

Finally, you would create a page in WP and embed your twig template with using a shortcode. Alternatively you can output a short list of the most recent discussed topics in a widget.

I can help you with setup if you would like to try this option.

The good thing with this plugin is that you would not need any PHP coding. Yet you should know HTML markup basics (easy to learn though). See here: Announcing WordPress plugin to display any data from Discourse


(Jeff Atwood) #3

How embedded? Use the available RSS feeds on the relevant Discourse pages to show latest topics, latest topics in a category, etcetera.


(Kane York) #4

You could use an iframe by using the outer nginx to set X-Frame-Options to ALLOWFROM main.mysite.com .


(AaronWebstey) #5

Kane, that’s more like what I was thinking. Thanks to all 3 for your
suggestions!

I’m a programmer; I have no problem getting my hands a bit dirty if I have
to. But I was trying to figure out if there’s a “right way” to do this,
similar to the embedding option in Vanilla. I’m surprised that this seems
to be such an abnormal request - are there really that few people who would
like to be able to just pop a Discourse forum into a page on their WP site?

(full disclosure - I was not able to just ‘pop a Vanilla forum’ onto my
site either, as I had issues with the embedding stuff on our site. But
apparently loads of others do it without any trouble).