Embed Most Recent Replies To Post in Specific Category

I’ve looked through the forums and understand how the embedding works and even how to embed the most recent posts. But I’m looking to try and create a widget that has the latest replies to all posts in a category.

1 Like

Discourse currently only has options for embedding the replies to a specific topic, or for embedding a topic list:

There has been some discussion about adding more embed widgets to Discourse. I’m not sure if that has been brought up on Meta though.

Do you have any ideas about how the Discourse replies should be displayed on the external site? For example, would the replies be grouped by topic, or would the widget just pull in the (say) 10 most recent replies?

It would be possible to get recent replies displayed on an external site by making requests to the Discourse API. That means that what you are trying to do would likely be achievable now, but it would require some custom development. An example of this kind of thing is: Wp-discourse-shortcodes plugin. It doesn’t do exactly what you are looking for, and only works for WordPress sites. On the off chance that you are wanting to display the replies on a WordPress site, that plugin could probably be extended to get the functionality you’re looking for.

Sorry for not replying back Simon, please don’t take it as me ignoring the effort you put into your reply. Time got away from me.

I think I might take a stab at creating a WordPress plugin that brings in a configurable amount of the top 10 more recent replies and cache them somewhere. I’ve found the embed to be harder to target and style as well.

1 Like