Embed a single post / reply in the body of a WordPress post?

I appreciate you can use the WP Discourse plugin to link posts to topics.

What I’m trying to do is write a blog post and be able to highlight certain replies or topics within the body of the post. Is there an oembed, iframe or other option for doing this for embedding a single reply or single post in the body of a WordPress post? Thanks for any insight!


Hey @martym,

The easiest way of selecting specific posts for Wordpress comments out of the box is using this commenting option:

Only Import Moderator-Liked

However, I suspect you’re after something more targeted, given you’ve mentioned a “single” post and also that you want to embed it in the body of the post itself. It’s not possible to retrieve a single post, based off of the post number (e.g. this post has a post number of 2) using the WP Discourse Comments functionality, or embed it within the post body for that matter.

To achieve that, you’ll need to write a custom wordpress script (probably in a seperate wordpress plugin) that creates a shortcode to pull a specific post from your Discourse instance and render it. The shortcode would take a post number as an argument. You’d then use that shortcode in the body of your post.

It wouldn’t be too hard, given you can use the existing authentication details used by the WP Discourse plugin in the shortcode’s request to your discourse instance, but it would take some coding.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.