How to display Twitter feeds on a WordPress site
You can display a public X profile or list on WordPress without a plugin by generating an embedded timeline and placing its code in a Custom HTML block. For multiple feeds, hashtag or keyword filters, sliders, and caching, use a dedicated feed plugin instead.
- 01Choose the feed type
- 02Generate the embed code
- 03Add the code to WordPress
- 04Check the front end
- 05Account for privacy and failures
- 06Use a feed plugin for speed
What you need
- A WordPress site with editor or administrator access
- The public X profile or list URL you want to display
- A cookie and privacy notice if your site controls third-party embeds
Choose the feed type
Decide whether you need one public profile timeline, a public list, or several filtered feeds. X’s built-in timeline tool supports profile and list timelines, but it is not a full feed-management system. Protected accounts cannot be displayed in embedded timelines.
If you only need one public account in a page or sidebar, the manual route is usually sufficient. Choose a plugin when you need multiple accounts, keyword or hashtag filtering, sliders, or central styling controls.
Generate the embed code
Open X’s timeline publishing tool, enter the public profile or list URL, and choose the display options offered there, such as height and light or dark theme. Copy the complete HTML code it generates. X’s current instructions use this approach rather than asking you to build the timeline markup yourself.
Keep both the timeline link and the supporting script from the generated code. Removing the script is a common reason the page shows an empty box or an unstyled link.
Add the code to WordPress
Edit the page, post, template, or widget area where the feed should appear. Add a Custom HTML block, paste the generated code, and save or publish the change. In a classic widget area, use a Custom HTML widget instead.
WordPress also supports a Twitter embed block for profile links and lists, but the direct HTML route gives you more control when X provides a widget code snippet.
Check the front end
Preview the page in a private browser window and check it on a phone. Confirm that the timeline loads, links open correctly, the height is usable, and the feed does not overflow its column. The editor preview is not enough because scripts, caching, consent tools, and security settings can affect the public page.
If the code disappears after saving, your user role or a security plugin may be stripping scripts. Ask an administrator to add it, use the site’s approved embed method, or place the code through a trusted template or widget area.
Account for privacy and failures
An X timeline is loaded from X rather than stored in your WordPress media library. X says embedded timelines may receive information such as the page URL, IP address, browser details, operating system, and cookie information, so review your privacy notice and consent setup before adding the feed.
The feed can also stop appearing if the account becomes protected, the post or account is removed, X changes its embed service, or a content-security or consent policy blocks the script. Keep a normal text link to the profile as a fallback.
Use a feed plugin for speed
For several feeds or targeted content, install and activate Custom Twitter Feeds Pro, then configure the accounts, filters, layout, responsive settings, and cache from its settings area before placing the feed in the required page or widget location.
This is the faster route when you need multiple filtered feeds, sliders, consistent styling, responsive display, and cached updates. It avoids maintaining separate embed snippets, although the external X content and your privacy obligations still need checking.
Let Custom Twitter Feeds Pro do it
Displays multiple filtered Twitter feeds with layouts, sliders, responsive styling, and caching for real-time social content.
Sources
- help.x.com /en/using-x/embed-x-feed?utm_source=openai
- wordpress.org /documentation/article/twitter-embed/?utm_source=openai
- help.x.com /en/x-for-websites-ads-info-and-privacy?utm_source=openai
Questions
- Can I display a Twitter feed in WordPress without a plugin?
- Yes, you can display a public X profile or list without a plugin by generating an embedded timeline and pasting its HTML into a Custom HTML block or widget. This is a good option for one straightforward feed. It becomes less suitable when you need keyword filtering, several sources, custom layouts, or one place to manage multiple feeds.
- Why is my embedded Twitter feed blank?
- A blank feed usually means the supporting X script was removed, blocked, or could not reach X. Check that you pasted the complete generated code, then test the public page rather than only the editor. Protected accounts, deleted content, consent tools, caching layers, and content-security settings can also stop the timeline from loading.
- Can WordPress show a Twitter profile timeline by pasting its URL?
- WordPress supports Twitter profile and list embeds through its embed tools, so pasting a supported public URL may create the appropriate embed block. If it fails, use the Custom HTML block with code generated by X instead. The account must have public posts, and older WordPress or provider changes can affect URL-based embedding.
- Can I filter a Twitter feed by hashtag or keyword?
- The current X timeline instructions focus on public profile and list timelines, so the built-in manual route does not provide a general WordPress keyword-filtering workflow. If filtering by hashtags, keywords, or selected users is central to the job, use a feed plugin that provides those controls and test its output after X changes its embed service.