I am trying to use
Discourse has the ability to embed the comments from a topic in a remote site using a Javascript API that creates an IFRAME. For an example of this in action, check out Coding Horror’s blog . The blog is run via Ghost but the comments are embedded from his Discourse forum .
One important thing to note with this setup is that users have to navigate to your forum to post replies. This is intentional, as we feel that the posting interface on a Discourse forum is currently much richer than what we …
on my wordpress blog because WP-Discourse plugin does not currently support connecting old blog posts to existing (migrated) discourse topics.
My current plan to connect an existing blog post to discourse topic via
DiscourseEmbed = { discourseUrl: 'http://discourse.example.com/',
topicId: 12345 };
However, I don’t know a way to insert HTML code at blog post level that can override existing comment code. That code seems to be outside the scope of a blog post HTML code
@tophee
mentioned a way
https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963/188?u=quintin_par
Was wondering if there is a solution to add the Javascript code per each blog to set the comments?
Note:
I am planning to set this code for each blog post manually changing the DiscourseEmbed. topicId for each post.
For all the new posts (i.e. posts without any comments so far) I’ll be using WP Discourse.
Why don’t You use the WP Discourse Plugin to do that?
3 Likes
That Post is Over a year and Half old, as far as I can see, The WP Discourse Plugin has came a long way since then and comments can indeed be integrated into posts. I haven’t ever had a need to use discourse comments on wordpress but I’m sure that there is a configuration Setting available under the plugin settings for the same.
Hmm no.
Here’s the comment from the author @simon a day back:
Yes, it exists in my development branch of the wp-discourse-shortcodes plugin. I think it works better as a shortcode than by adding it as an option to the Publish to Discourse metabox. I’m not sure what is the best way to include this in the wp-discourse plugin. The shortcode could either be added to wp-discourse, or kept in the shortcodes plugin. In either case, I’ll get it ready to go soon.
Are You trying to display discourse comments on existing wordpress articles?
EDIT: Seems Like a Yes
Did anyone pick this up, yet? Looking to link existing blog post and existing discourse topics.
You can wait until the update for plugin is out as it is going to be a lot of work anyway to individually modify all your posts over wordpress.