1. Blog
  2. X (Twitter) marketing
  3. How to embed X (Twitter) timelines: A must-read for WordPress site owners

How to embed X (Twitter) timelines: A must-read for WordPress site owners

Published date Updated date

We explain X (Twitter) timeline embedding, covering basic mechanics, pros and cons, embedding steps, and optimization techniques to boost SEO. We also answer common questions, such as alternatives to timeline embedding, why posts might appear in chronological order, whether Spaces can be embedded, and compatibility with Wix and Blogger.

This is a must-read if you are thinking, "I don't know the correct embedding steps," "I'm worried about negative SEO impact," or "I want to know how to do this on platforms other than WordPress." Whether you're embedding an X (Twitter) timeline for the first time or looking to use it more effectively, this guide is for you.

What is X (Twitter) timeline embedding?

What is X (Twitter) timeline embedding?

X (Twitter) timeline embedding is a feature that allows you to display a list of posts (timeline) from your own X (Twitter) account or another user's account on your website.

Unlike pasting a single post, it displays the latest posts from an entire account, making it easier for site visitors to access real-time information.

There are several types of embedding methods, including timelines:

CategoryContent displayedUse cases
Single post (tweet) embeddingDisplays only one selected postQuoting specific posts or sharing feedback within an article
Timeline embeddingList of postsDisplaying latest updates on corporate sites or aggregating campaign info

Embedding works by using HTML tags compatible with X (Twitter)'s "Publish tool" or "oEmbed," or by using WordPress plugins and external services that retrieve data via API to generate HTML.

Benefits of embedding X (Twitter) timelines

Benefits of embedding X (Twitter) timelines

Using timeline embedding offers the following benefits for website owners.

Benefits of embedding X (Twitter) timelines

Here, we will explain each of these three benefits.

Attract visitor interest

By embedding an X (Twitter) timeline and showing the latest posts, images, and videos on your site, you can quickly capture visitor interest and encourage them to stay on the page.

This is because it contains more visual elements than static text-only information, making it easier to catch the user's eye.

For example, embedding a cafe's account timeline on its homepage can showcase photos of new menu items and the shop's atmosphere, potentially increasing the desire to visit.

Improve engagement

Since likes, replies, and reposts (retweets) are displayed directly within the embedded X (Twitter) timeline, it easily attracts visitor interest and can lead them to follow you directly.

Seeing real reactions to posts gives the impression that "this account is supported by many people," making it easier to drive actions like follows and likes.

Boost SEO

Since search engines tend to favor sites with frequently updated content, embedding a timeline can indirectly strengthen your SEO.

By embedding fresh posts (tweets) containing relevant keywords, new content is periodically added to the page, effectively increasing the site's update frequency.

Disadvantages of embedding X (Twitter) timelines

Disadvantages of embedding X (Twitter) timelines

While timeline embedding has many benefits, there are also points to consider. Be aware of the following disadvantages before implementation.

We will explain each of these, so please use this as a reference when considering implementation.

Page loading speed may decrease

The X (Twitter) embed widget calls numerous external JavaScript and CSS files. As a result, there is a risk that the overall page loading speed may decrease.

Embedding many posts at once can make the page feel heavy and may lead to user drop-off.

May not be displayed depending on viewer status

Due to specification changes in X (Twitter) since the summer of 2023, embedded timelines are now only displayed when the viewer is logged into X (Twitter).

If the user is logged out or not logged into the X (Twitter) app, the embedded area will display "Nothing to see here yet," and posts will not be visible.

Quoting without permission can cause issues

When embedding posts from others, you must be mindful of copyright and portrait rights.

While X (Twitter) Terms of Service allow for sharing posts, they state that responsibility for the content belongs to the poster, and quoting without permission can lead to trouble.

When featuring posts from general users who participated in a campaign on a corporate site, it is advisable to obtain permission in advance. Taking proactive measures, such as including a note in the campaign overview stating "Your posts may be featured," is important.

Steps to embed an X (Twitter) timeline

Steps to embed an X (Twitter) timeline

The basic steps for embedding a timeline are as follows.

Please use this as a reference if you want to implement embedding.

STEP

Access X Publish

Access X Publish

First, access the official X (Twitter) Publish tool. Once the page opens, paste the URL of the account you want to embed into the input field.

After entering the URL, the "Embedded Timeline" option will automatically appear; click on it.

If you want to embed the entire account timeline rather than a single post, you must select the timeline format.

STEP

Copy the code

Once you complete the settings in the Publish tool, an HTML embed code will be generated. The displayed code consists of two parts.

The first is the link part starting with "<a class=\"twitter-timeline\" ...>", and the second is the script part "<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>".

Copy the entire set of these two lines. It is important to copy both, as the embed will not display correctly with only one of them.

STEP

Paste onto your site

Paste the copied embed code into the location on your site where you want it to appear. In WordPress, simply paste the code (or the URL of the post/timeline) into a "Custom HTML" or "Embed" block, and it will be displayed automatically.

Keep in mind that the timeline is only visible depending on the viewer's login status. It may be helpful to site visitors to include an explanatory note or a screenshot alongside the embed.

STEP

Customize

If the basic settings in the Publish tool are not enough, you can **fine-tune the embed settings by editing the data-* attributes within the code**. Common customization attributes are listed below.

Customization attributes

  • data-width / data-height: Specify the width and height of the display area (can be set in px or %)
  • data-theme: Choose "light" or "dark" to change the background color
  • data-chrome: Use "noheader noborders nofooter" to hide the header, borders, or footer
  • data-lang: Specify a language code (such as "en") to change the UI display language
  • data-tweet-limit: Limit the number of posts displayed (up to 20)
  • data-dnt: Set to "true" to prevent sending viewer information to X (Twitter) (privacy protection)

Adjusting these attributes allows you to customize the embed to match your site's design.

SEO tips for embedding X (Twitter) timelines

SEO tips for embedding X (Twitter) timelines

Here are some tips for using timeline embeds while considering page speed and user experience.

SEO tips for embedding X (Twitter) timelines

Use the following methods to effectively utilize timeline embedding.

Use lazy loading

By using lazy loading, you can delay the loading of the timeline based on the scroll position, speeding up the initial page display.

If you use WordPress, you can set this up by installing a dedicated plugin or using features built into your theme.

Plugins like "a3 Lazy Load" and "WP Rocket" are popular choices.

Set a cache duration

The X (Twitter) timeline works by fetching the latest posts every time it loads. However, calling it in real-time every time can slow down page loading and put a strain on the server.

This is where "caching" (saved data) comes in handy. By saving the latest timeline for a certain period, you can quickly display the stored data without having to fetch it every single time.

If you are using a WordPress plugin, there is often a "Cache Time" setting. Setting this to 30 minutes to 1 hour will help the timeline display more smoothly.

Optimize image sizes

The X (Twitter) timeline also displays images and videos included in posts. If images are too large or heavy, it can slow down the page load. Therefore, optimizing images to be lighter will help the page display more quickly.

However, no complex operations are required. On WordPress, you can use image compression plugins that automatically lighten images upon upload, or convert images to the lightweight WebP format to speed up your entire site.

While X (Twitter) embedding automatically adjusts image sizes, making all images on your site lighter will ensure smoother display, including the timeline loading. Mobile display, in particular, slows down significantly with heavy images, so keeping them light provides a better user experience.

Followers not showing on X (Twitter)? Causes and solutions explained

Alternatives to X (Twitter) timeline embedding

Alternatives to X (Twitter) timeline embedding

While the X (Twitter) timeline is convenient, it may not display in some situations, such as when a user is not logged in or due to display issues. In such cases, we recommend showing information in other ways rather than insisting on embedding.

For example, by posting a screenshot of a post, anyone can reliably see the content. This is very useful for important announcements or information you want to keep fixed.

Unlike embedding, it requires manual updates, but the biggest advantage is that it guarantees visibility.

Frequently asked questions about X (Twitter) timeline embedding

Frequently asked questions about X (Twitter) timeline embedding

We have summarized frequently asked questions when actually implementing timeline embedding. Resolve common points of confusion and make the most of the embedding feature.

Let's look at each method.

What is the difference between individual posts and a timeline?

Embedding an individual post is the method used when you want to display only one specific post on a page. It is useful when you have a specific post to quote or information to introduce.

On the other hand, timeline embedding allows you to show a collection of posts from that account in a list. It is suitable for situations where you want to automatically show the latest posts, such as news sections on corporate sites, campaign information, or the latest event updates.

How are posts (tweets) with videos handled?

Posts containing videos or images can be embedded just like regular posts. X (Twitter) automatically detects the videos or images and displays them at an appropriate size, so no special settings are required.

Why is the timeline displayed in chronological order?

It is possible that the latest posts are not being fetched due to specification changes or restrictions on the X (Twitter) side.

Why is the order jumbled?

Timeline embedding is not necessarily displayed in reverse chronological order. Depending on the viewer's login status, cache state, and the type of widget (profile, list, search, etc.), posts sorted by likes or replies may be displayed first.

Can X (Twitter) Spaces be embedded in a website?

Since X (Twitter) Spaces is an audio live feature, as of 2025, no official feature is provided to embed it directly into a website.

Is embedding a timeline free or paid?

Official widgets are available for free.

Can I embed a timeline on Wix or Blogger?

On Wix and Blogger, you can also display a timeline by pasting the X (Twitter) widget code.

Summary

In this article, we covered how to embed X (Twitter) timelines, the pros and cons, and SEO optimization techniques.

Keep these points in mind for a smooth display experience.

  • Use lazy loading to speed up initial page loads
  • Set cache duration to reduce server load
  • Convert images to WebP for more stable loading

Ultimately, it is important to understand how timelines work and ensure a stress-free experience for your readers. Choose an embed format that aligns with your site's goals to create an environment where visitors can easily access information.

Use it for free forever
with our Free plan

Get started instantly with your Google account or email address.

Free plan is always $0

Start for free
The marketing tool for social media managersStart SocialDog for free