Widget to embed in 3rd party websites

AI-generated summary

Widget to embed in 3rd party websites

Kane_Thomas is seeking to embed specific topics or latest posts from a Discourse forum into a 3rd party website using JavaScript or iframe code.

Decorbuz shared a related solution for embedding comments, but Jonathan5 provided a relevant solution for embedding a list of topics.

Kane_Thomas attempted to implement the solution but encountered an issue where only one topic is displayed, despite specifying a category with multiple topics and setting per-page="5". The embed code used is:

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

The issue persists, and Kane_Thomas is seeking further assistance. Falco requested the URL where the embed is being used, and Kane_Thomas shared the HTML code, which is not yet live due to the issue.

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!

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

Yes, it’s possible, and works well:

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

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:

:thinking:

Does anyone have any ideas? :cry:

Can you share the URL where the embed lives?

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

<!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>