How to show the latest discussion on the front page of our main website

AI-generated summary

Showing Latest Discussions on a Main Website

Christopher_Kidd is looking for a way to display the latest 5 discussion topics from a Discourse forum on the front page of a main website. The forum will be a subdirectory of the larger site, and the goal is to engage users with the forum.

JammyDodger suggests embedding Discourse on the website using JavaScript, providing two reference posts from Meta Discourse: embedding a list of Discourse topics and embedding Discourse comments via JavaScript.

Canapin shares their experience displaying the latest topics on their WordPress website using JSON feeds, such as /latest.json and /site.json, and schedules updates using a CRON task.

Christopher_Kidd thanks the respondents and plans to explore these options, later confirming in post #5 that the suggestions are helpful.

I’m sure this has been covered somewhere BUT at the risk of getting clobbered, does anyone know how to show the Latest Discussions (rss? xml?) on another page?

For us, the discourse forum will be a sub-directory of a larger site. I’d love to show the Latest 5 Discussion topics on the front page of the main site as a way to get people engaged with the forum.

Any thoughts on how to do this? Reference posts?

You can embed discourse on a website:

Would that work for your set-up?

I don’t know if it will help, but I show an exerpt of the last topics on my Wordpress website.
https://monocycle.info/ Look at the right sidebar.

I use https://forum.monocycle.info/latest.json?order=created&ascending=false
But I need additional information, so I use I use https://forum.monocycle.info/site.json to get the categories’ names from their ID.
I also use https://forum.monocycle.info/t/[topic-number] for each of my 5 last topics to get additional information.

I don’t do much of these requests, I use a CRON task so it’s not updated in real time, maybe twice or once a day…

Maybe @JammyDodger’s link will be of better help :smile:

Thank you for the response. I’ll dig into this and let you know if it works for our site.

-ck

This is great, thanks!