Post Widget

The post widget is used to embed a particular post and its responses in your website or product.

Using the JavaScript Snippet
You can use the following script anywhere in the <body /> tag to add the post widget:

// Make sure you already have Tribe script in the <head /> tag
<div id="post-widget"></div>
<script>
  window.Tribe('post', {
    id: 'post-widget',     
    postId: '5e34aa3949858b2fdcba9ef7',
    components: ['topics', 'post', 'share', 'responses']
  })
</script>

Below you can find all available options for this widget:

Option

Type

Default

Description

id
(required)

String

null

The ID of the div to append the widget to.

postId
(required)

String

null

Defines the ID of the post to be used in the widget.

components

Array of topics, post, share, responses

['topics', 'post', 'share', 'responses']

Defines which elements should be displayed in the widget.

Using Iframe
If you are not allowed or don't want to add JavaScript to your page, or want to embed the widget in a WebView on phone you can use the following URL and pass the options as query string:

<<community_url>>/embed/post/{id}

Here is an example inside an <iframe /> tag:

<iframe
  src="https://community.tribe.so/embed/post/5e34aa3949858b2fdcba9ef7?components=post,responses"
  frameborder="0"
  width="100%"
  style="min-height: 300px; width: 100%;"
  allowtransparency="true">
</iframe>

Did this page help you?