tidytweet

Guide

Filtering posts you embed on your own site

Short answer

You can't filter the contents of an embedded X timeline from your own page, because it renders inside X's frame. To control what appears, embed individual posts you've chosen, or run posts through a moderation step (your own review or a social wall tool) before they reach the page. Clean the embed code, turn on do-not-track and make sure the fallback text reads well if the script is blocked.

Key takeaways

  • Single-post embeds are opt-in, so they're the safest way to show X content on your site.
  • Embedded timelines show whatever the account or list posts next; you can't filter them from your page.
  • Embedded timeline behavior has changed several times since 2023, so test before relying on one.
  • Every embed should have readable fallback text for visitors who block third-party scripts.

Single posts or a timeline: which should I embed?

Embed single posts when you need control; a timeline only makes sense for an account you fully trust and accept you can't edit.

Single post embed Embedded timeline
Who chooses what appears You, one post at a time Whoever posts to the account or list
Can you filter it Yes, by not embedding it No, not from your page
Breaks when That post is deleted X changes timeline embeds, or the account goes private
Page weight One script, one card per post One script, a scrolling frame
Best for Articles, case studies, event recaps Your own account on your own site

Embedded timelines have changed behavior more than once since 2023, at times showing a limited set of posts or asking visitors to log in. If a timeline matters to your page, check it on a logged-out browser after any change.

How do I curate posts before they reach my page?

Treat embedding as publishing: pick posts in a review step, then embed only the approved ones.

A light process for a campaign page or event recap:

  1. Collect candidate posts (a hashtag search, mentions, posts your team flagged).
  2. Run the text through the spam scorer and your rule set to drop the obvious junk.
  3. Read what's left. Open each author's profile; a nice post from an account full of hate is still a problem on your page.
  4. Paste the approved post URLs into the embed cleaner, which builds the embed code for each.
  5. Publish, and set a reminder to recheck the page in a month.

How do I make embeds lighter and more private?

Add data-dnt, strip tracking parameters from links, and load the widgets.js script once per page.

X's embed script reads a few options from the blockquote. data-dnt="true" tells X not to use the embed for personalized suggestions and ads, per X's own parameter reference. data-cards="hidden" stops links in the post from expanding into preview cards, which removes some images and requests. data-conversation="none" shows only the post you chose, not the post it replies to. The embed cleaner sets all three and removes the ref_src parameter that X adds to every link in the code.

For the most private option, skip the script and publish the blockquote alone. Visitors see the post text, the author and a link. Nothing loads from X until someone clicks.

What should the fallback look like?

The fallback is the blockquote's own text, so make sure it includes the post text, the author and a working link.

Many visitors block third-party scripts, and some corporate networks block X entirely. Code copied from X already includes the text and a date link. Embed code generated from a bare URL doesn't include the post text, so add a sentence of context in your own words next to it.

Checklist

  • Every embedded post was chosen by a person, not pulled automatically
  • Embed code cleaned: no ref_src, data-dnt on, one widgets.js
  • Page reads sensibly with scripts blocked
  • Embeds checked again after a month for deleted posts

Common questions

Can I remove one post from an embedded timeline?

Not from your page. The timeline is drawn by X inside its own frame, and your site's code can't reach into it. Embedding a curated set of single posts instead gives you that control.

Do embedded posts disappear if the original is deleted?

The live card can't load once a post is deleted or made private, so visitors see only the fallback blockquote text. Check old embeds now and then and replace broken ones with a quote or remove them.

Is embedding someone's post allowed?

Embedding through X's official embed code is the method X offers for showing posts on other sites. For marketing use, such as putting a customer's post in an ad, ask the author first; that's both polite and often required by ad platforms.

Sources

  1. X Developer Platform: Embedded posts parameter reference
  2. X Developer Platform: oEmbed API