# Embed discourse topic but do not automatically create

**URL:** https://meta.discourse.org/t/embed-discourse-topic-but-do-not-automatically-create/111705
**Category:** Support
**Created:** [March 15, 2019, 3:34pm UTC](https://meta.discourse.org/t/embed-discourse-topic-but-do-not-automatically-create/111705 "2019-03-15T15:34:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Andrew\_Duncan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrew_duncan/32/134143_2.png) [@Andrew\_Duncan](https://meta.discourse.org/u/Andrew_Duncan)
#### Post date: [March 15, 2019, 3:34pm UTC](https://meta.discourse.org/t/embed-discourse-topic-but-do-not-automatically-create/111705/1 "2019-03-15T15:34:19Z")

</div>

I would like it so the topic is only created by the RSS feed, and not by the embed. If the embed cannot find an associated topic, then it does not display anything (the message saying topic is being generated would be done on my site, not through discourse). Is this possible?

Originally I was hoping to use the discourse API to find a topic by the discourseEmbedUrl and if the topic exists then use that ID to display the comments, however this doesn’t seem to be possible with the API.

---

<div class="post-metadata">

### Author: ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)
#### Post date: [March 16, 2019, 5:11pm UTC](https://meta.discourse.org/t/embed-discourse-topic-but-do-not-automatically-create/111705/2 "2019-03-16T17:11:59Z")

</div>

Hey, good question and something I’ve looked into a bit as well! Not totally following re: the RSS thing but it sounds like you may be looking for something along the line of what’s been discussed here? —

> [@Embedding, but don't automatically create a topic until a user chooses to comment](https://meta.discourse.org/t/embedding-but-dont-automatically-create-a-topic-until-a-user-chooses-to-comment/61450):
>
> This is a fantastic feature! I look forward to making good use of it. Would it be possible to not automatically create a topic until a user chooses to comment on the article? I want to prevent having a ton of topics with no replies (i.e. which were created automatically by visitors who only read articles and not commented on them). I’m specifically thinking of a site with a large number of articles; only a few of them will actually have comments. What would be the most reasonable way to achiev…

The short answer seems to be: not yet possible out of the box, and kind of tricky, but would be feasible to build as custom functionality.

Currently there **is** a way to create topics via the [WP Discourse](https://github.com/discourse/wp-discourse) plugin where the topic is created and linked to the WordPress post, but unlisted on Discourse until it gets at least one reply. (Not sure if that may be relevant for you, but a cool partial solution for this kind of thing!)

I see there’s also some discussion here w/ about possibly implementing either as PR or plugin but not clear if it went anywhere:

> [@\[paid\] Preference to create & embed a topic via JavaScript only when a user clicks the "Start Discussion" link](https://meta.discourse.org/t/paid-preference-to-create-embed-a-topic-via-javascript-only-when-a-user-clicks-the-start-discussion-link/78593):
>
> What would you like done? Currently when [Embedding Discourse Comments via Javascript](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963), a new Discourse topic is created whenever the corresponding external page is being loaded. The feature requested consists on creating the topic only when a user would click the “Start Discussion” link in the external page. Details: This preference could be defined per host at /admin/customize/embedding. The “Start Discussion” link would include a rel="nofollow" in order to avoid as much as possible the crea…

Maybe @joebuhlig can chime in! Personally I would be interested in this sort of thing for the use case of enabling Discourse commenting for thousands of WP posts without first having to have all the topics created in Discourse. I’m sure a more general solution for embeds could be useful for lots of scenarios.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [March 16, 2019, 7:13pm UTC](https://meta.discourse.org/t/embed-discourse-topic-but-do-not-automatically-create/111705/3 "2019-03-16T19:13:15Z")

</div>

Hey, Andrew! If you look at the second link that @bts shared you’ll see the expected path for this. But the best I know is that it doesn’t exist to date.

---

<div class="post-metadata">

### Author: ![Andrew\_Duncan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrew_duncan/32/134143_2.png) [@Andrew\_Duncan](https://meta.discourse.org/u/Andrew_Duncan)
#### Post date: [March 18, 2019, 3:27pm UTC](https://meta.discourse.org/t/embed-discourse-topic-but-do-not-automatically-create/111705/4 "2019-03-18T15:27:15Z")

</div>

Hey Brendan,

Sorry for the confusion about the RSS feed. Pretty much we have an RSS feed that is crawled every 5 minutes by Discourse to create topics for entries on our site. This creates the topics on our Discourse with the appropriate title and description. However, if someone were to visit the page for that entry after the entry was added but before our RSS feed was crawled again, then Discourse would automatically generate a topic and then display it. This would normally be fine, but in our case this will not generate a topic with the correct title, so we would like the Discourse topic to only show existing topics and not create one if it does not exist for the current entry. From my searching this seems to only be possible if you reference the topicID of a topic.

I do like the idea of only creating a thread if a user decides to create one, as this would keep our Discourse site less cluttered.

It seems that for my use case, it might be easier to fix the issue I mentioned above on my side (title not generating properly).

Thanks for the response. Cheers!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 9, 2022, 1:18pm UTC](https://meta.discourse.org/t/embed-discourse-topic-but-do-not-automatically-create/111705/6 "2022-05-09T13:18:52Z")

</div>


