How do I display X (Twitter) posts on my website?on my website?
You can show your X (formerly Twitter) posts on your website in two ways:
- Embed a timeline that automatically shows your latest posts.
- Embed individual posts, for example in a blog article or news page.
Before you start: a timeline only looks good if you post regularly. If your X account isn't very active, a feed of old posts can make your website look out of date. Consider featuring individual posts instead, or linking to your X profile.
Embed a timeline of your latest posts
- Go to publish.x.com.
- Enter the URL of what you'd like to show:
- Your profile, for example
https://x.com/yourcompany, to show your latest posts. - A public X list to show posts from a group of accounts.
- Your profile, for example
- Select Embedded Timeline.
- Click set customization options to choose the height, width and theme (light or dark) to match your website, then click Update.
- Click Copy Code.
- Add the code to your website:
- WordPress: open the page, add a Custom HTML block where you want the timeline, paste the code, and click Save or Update.
- HubSpot pages: add an embed or rich text module, paste the code into the source code or embed field, and publish the page.
- Other websites: paste the code into the page's HTML where you want the timeline to appear, or ask Gate 39 to add it for you.
Tip: to show a set number of posts, add
data-tweet-limit="5"(any number from 1 to 20) to the<a class="twitter-timeline"part of the code. The timeline will adjust its height to fit.
Embed a single post
- On X.com, open the post you want to embed.
- Click the three dots (⋯) on the post, then select Embed post. You can also paste the post's URL into publish.x.com.
- Copy the code and paste it into your page, using a Custom HTML block in WordPress.
In the WordPress block editor, you can often just paste the post's URL on its own line and WordPress will embed it automatically.
Check that it works
After publishing, view the page in a private or incognito browser window to confirm the posts appear. X's embedded timelines have occasionally stopped loading in the past. If your timeline shows as blank or just a link, check that your X account is public, or contact Gate 39 for help.
Other options
- Social feed tools: third-party tools, such as Juicer or Smash Balloon for WordPress, can show posts from X and other networks in one styled feed. They offer more design options and may be more reliable than X's own embed.
- A follow button: publish.x.com can also create a Follow button that links visitors to your X profile, which is lighter than a full timeline.
Please note: X embeds load scripts from X's servers, which can slow down your pages and may set cookies. If your website uses a cookie consent banner, talk to Gate 39 about how embeds are handled.
Need help? Contact the Gate 39 team through the Customer portal.
References
[1] X Developer Docs – Embedded Timelines
[2] X Help Center – How to embed a timeline
[3] X Developer Docs – X for Websites overview
[4] X Developer Docs – Embedded Timelines (customization)
[5] X Developer Community – Twitter Timeline Embed Not Working
[6] Juicer – Embed a Twitter (X) Feed on Your Website: 5 Ways for 2026