Skip to main content

A fully-rendered Post does not display on my page

An embedded Post comes in two parts: a <blockquote> containing Post information and the JavaScript file from a X server which converts the <blockquote> into a fully-rendered Post. If you see Post text on your page but not a fully-rendered Post it’s possible your CMS or editing interface stripped the <script> needed to render the Post. Try switching to a “text,” “HTML,” or “code editing” mode to directly input the pre-formatted Post information. Rich-text or WYSIWYG editors can misinterpret pasted HTML code, which may interfere with placing a Post on your page. If you cannot reliably work with HTML in your articles then you or your website team should add the X for Websites JavaScript to your webpage template to interpret any buttons or widgets on the page. Add the following code just before the closing </body> element in your website template:
<script id="twitter-wjs" type="text/javascript" async defer src="//platform.x.com/widgets.js"></script>
The JavaScript snippet above loads the X widgets JavaScript if it is not already present on the page. The loaded JavaScript will convert embedded Posts, Embedded Timelines, Post Buttons, and Follow Buttons on your page into interactive widgets and buttons.

What happens when an author deletes their Post?

The X widgets JavaScript will not display a fully-rendered Post if the Post no longer exists on X. The fallback <blockquote> containing Post information will be visible on the page.

Will embedded Posts adapt to my responsive site?

An embedded Post will adjust to the width of its containing element when inserted into a page. An embedded Post requires a minimum width of 220 pixels and will fill up to 550 horizontal pixels.

How can I create an Embedded Post of a consistent height?

A basic embedded Post includes Post text up to 140 characters in length, author information, a timestamp, and Post actions. An embedded Post shows the previous Post in a conversation and photos, a video, or a link preview associated with the Post by default. Set conversation and cards parameters to false to limit Post display to just its basic formatting.