# Enhancements to Embedding Comments

**URL:** https://meta.discourse.org/t/enhancements-to-embedding-comments/29822
**Category:** Feature
**Tags:** feedback
**Created:** [June 9, 2015, 8:38pm UTC](https://meta.discourse.org/t/enhancements-to-embedding-comments/29822 "2015-06-09T20:38:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [June 9, 2015, 8:38pm UTC](https://meta.discourse.org/t/enhancements-to-embedding-comments/29822/1 "2015-06-09T20:38:36Z")

</div>

I checked in two enhancements to embedding comments on remote sites today:

**You can now embed comments on multiple hosts.** Just use the + button to add more.

 ![](https://global.discourse-cdn.com/meta/original/3X/4/7/47c2691269cbd2c7bd9470749421949f0de347d3.png)

**You can also embed to an existing topic without creating it**. Normally embedding is meant to create the topic, but some people want to create the topic in advance and then embed its comments elsewhere. To do this, grab the `topicId` from the URL. The `topicId` is the number that immediately follows the slug. For example given the URL `http://meta.discourse.org/t/hello-world/12345/2` the `topicId` is 12345.

Use this slightly different embed code to embed by topic. Replace `discourseUrl` and `topicId` with your values:

```html
<script type="text/javascript">
  var DiscourseEmbed = {
    discourseUrl: 'http://meta.discourse.org/',
    topicId: 29425
  };

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
      d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
  })();
</script>

```

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [June 9, 2015, 8:45pm UTC](https://meta.discourse.org/t/enhancements-to-embedding-comments/29822/2 "2015-06-09T20:45:46Z")

</div>

Oh joy! That’s one major step closer to having this:

> [@Link existing forum topic to new WordPress post](https://meta.discourse.org/t/request-use-existing-forum-topic-for-new-wordpress-post/24268):
>
> After migrating from bbPress to Discourse I realised there’s one thing I miss about our old “forum for comments” integration (besides that, everything works way better). Quite frequently, big news would be shared on the forum before it turned up on the blog. The topics that really stood out could be “featured” via a blog post. Before posting, we’d have the option of bbPress creating a new topic, or simply point to an existing topic, which in this case is what we’d do. Quite handy!

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [June 9, 2015, 9:22pm UTC](https://meta.discourse.org/t/enhancements-to-embedding-comments/29822/3 "2015-06-09T21:22:09Z")

</div>

Super happy about this. Thanks much!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 21, 2016, 5:32am UTC](https://meta.discourse.org/t/enhancements-to-embedding-comments/29822/4 "2016-10-21T05:32:24Z")

</div>


