# Widget to embed in 3rd party websites

**URL:** https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494
**Category:** Development
**Created:** [April 27, 2022, 10:29pm UTC](https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494 "2022-04-27T22:29:55Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Kane\_Thomas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kane_thomas/32/137561_2.png) [@Kane\_Thomas](https://meta.discourse.org/u/Kane_Thomas)
#### Post date: [April 27, 2022, 10:29pm UTC](https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494/1 "2022-04-27T22:29:55Z")

</div>

Is there any way to embed either specific topics, or “latest posts”, or similar into a 3rd party site? Preferably just some Javascript or iframe code.

I tried searching and Googling and couldn’t find a solution.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Decorbuz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/decorbuz/32/235124_2.png) [@Decorbuz](https://meta.discourse.org/u/Decorbuz)
#### Post date: [April 27, 2022, 10:40pm UTC](https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494/2 "2022-04-27T22:40:01Z")

</div>

This was the closest thing I could think of, but it’s for comments.

> [@Embed Discourse comments on another website via Javascript](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963):
>
> 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](http://blog.codinghorror.com/welcome-to-the-internet-of-compromised-things/#discourse-comments). The blog is run via [Ghost](https://ghost.org/) but the comments are embedded from his [Discourse forum](http://discourse.codinghorror.com/t/welcome-to-the-internet-of-compromised-things/3550). 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 …

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [April 28, 2022, 10:43am UTC](https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494/3 "2022-04-28T10:43:25Z")

</div>

Yes, it’s possible, and works well:

> [@Embedding a list of Discourse Topics in another site](https://meta.discourse.org/t/embedding-a-list-of-discourse-topics-in-another-site/125911):
>
> If you grab the latest builds of Discourse you’ll get a [the ability to embed topic lists](https://github.com/discourse/discourse/commit/23367e79ea735598766ec6f507f6132e0bad3dba) in other sites via some simple Javascript and HTML. The typical use case for this is a blog or other content driven site, where you want a widget on the side of the screen that lists topics. You can filter by category, tag, or [any of the other public](https://github.com/discourse/discourse/blob/master/lib/topic_query.rb#L51-L73) filter options available. How to Embed a list of Topics First, you must enable the embed topics list site setting. Then, in your HTML add a \<script\> tag that…

---

<div class="post-metadata">

### Author: ![Kane\_Thomas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kane_thomas/32/137561_2.png) [@Kane\_Thomas](https://meta.discourse.org/u/Kane_Thomas)
#### Post date: [April 28, 2022, 4:29pm UTC](https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494/4 "2022-04-28T16:29:24Z")

</div>

Awesome! This looks like it should do the trick.

Just curious though why I can only get it to show 1 topic? Does anyone know?

Here’s the category (that has many topics): [Amazon Specific - Process & Workflow Management Forum](https://forum.flowster.app/c/amazon-specific/17)

And the embed code:  
`<d-topics-list discourse-url="https://forum.flowster.app" template="complete" top_period="all" category="17" per-page="5"></d-topics-list>`

But only one topic appears:

 ![Selection_920](https://global.discourse-cdn.com/meta/original/4X/9/5/8/958a3ca3a35e117f0d0fbc640720cf0d7cca0bdf.png)

🤔

---

<div class="post-metadata">

### Author: ![Kane\_Thomas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kane_thomas/32/137561_2.png) [@Kane\_Thomas](https://meta.discourse.org/u/Kane_Thomas)
#### Post date: [June 26, 2022, 8:43pm UTC](https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494/5 "2022-06-26T20:43:09Z")

</div>

Does anyone have any ideas? 😢

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [June 27, 2022, 1:46am UTC](https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494/6 "2022-06-27T01:46:49Z")

</div>

Can you share the URL where the embed lives?

---

<div class="post-metadata">

### Author: ![Kane\_Thomas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kane_thomas/32/137561_2.png) [@Kane\_Thomas](https://meta.discourse.org/u/Kane_Thomas)
#### Post date: [June 27, 2022, 3:13am UTC](https://meta.discourse.org/t/widget-to-embed-in-3rd-party-websites/225494/7 "2022-06-27T03:13:11Z")

</div>

@Falco here’s the HTML. It doesn’t live anywhere yet 🙂 (since it’s not working, only one topic appears)

```plaintext
<!DOCTYPE html>
<html lang="en">
  <head>
	<script src="https://forum.flowster.app/javascripts/embed-topics.js"></script>
</head>
<body>
<d-topics-list discourse-url="https://forum.flowster.app" template="complete" top_period="all" category="17" per-page="5"></d-topics-list>
</body>
</html>

```
