When you post a WordPress link on X, the card that appears (the image, title and description block) is decided by meta tags. Those tags sit in the page <head>. WordPress does not need a special feature for this, because the tags are ordinary HTML. The job has three moves. Build the correct tag set, get it into the <head> of the page being shared, and confirm it survived into the published page.

This guide uses the free Twitter Card Generator on Ovatly to build the tags. The generator asks for the card type, handles, title, description and image. It warns about the common mistakes and shows a preview mock before you copy anything. The WordPress half of the job is deliberately described at the level every setup shares. The tags must end up in the page head. The published page source is where you prove they did.

Contents

  • Quick answer
  • What you are adding, and where it has to live
  • What each page needs
  • Step by step, part 1: build the tag set
  • Step by step, part 2: put the tags in the page head
  • Step by step, part 3: verify in the page source
  • Worked example: the BrewLab article card
  • Limitations
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Open the Twitter Card Generator and choose the card type (usually summary_large_image for articles and product pages). Add the site handle and, if different, the creator handle, each with its @. Then enter the page's title, description and an absolute image URL. Read any warnings, check the preview mock, and copy the tags. Place them in the <head> of that page through whatever route your WordPress setup allows for adding head markup. Publish, and view the page source to confirm the twitter:card line is present. Repeat per page with that page's own title, description and image.

What you are adding, and where it has to live

The tag set decides how a link looks when posted on X: card type, title, description, image and the site and creator handles. It is a handful of <meta> lines, and they belong in the <head> of the page, not in the post content. Tags pasted into the body of an article are body text as far as a crawler is concerned; they will not build a card.

One fallback is worth knowing before you start. X falls back to Open Graph tags when Twitter-specific tags are missing. So twitter:title and twitter:description are optional on pages that already have good OG tags. The card type and the handles are still worth adding explicitly, because they are the parts the fallback does not supply.

What each page needs

Two parts of the set are site-wide habits: the site handle, and the creator handle where the author differs. The rest is per page. The title and description should describe that page. The image should be that page's wide image at an absolute URL, meaning the full address starting with https://. Card images must be absolute URLs; a relative path is a listed cause of cards not appearing. X also documents size and file limits for card images, for example under 5 MB. Check the current developer documentation before using a very heavy image.

Gather these values for the page before you open the generator, and the build takes a minute.

Step by step, part 1: build the tag set

  1. Open the Twitter Card Generator and choose the card type, usually summary_large_image for articles and product pages.
  2. Add the site handle and, if different, the author's creator handle.
  3. Enter the title, description and an absolute image URL.
  4. Read any warnings, check the preview mock, and copy the tags. A warning about an empty image on a large-image card, or a handle missing its @, is a fix to make before copying, not after.

Step by step, part 2: put the tags in the page head

WordPress setups differ, so use the route yours already gives you for adding markup to the page head. That might be a head-code field in your theme's settings, if it offers one. It might be the header template of a child theme, if you maintain one. Or it might be any equivalent route your setup provides. Three rules apply whichever route you choose.

First, the tags must land in the <head> of the page being shared, so a route that only injects into the body or footer does not count. Second, each page needs its own set with its own title, description and image. A single site-wide paste with one article's values would give every page the same card. Third, before adding anything, view the page source and search for twitter:card. If a set is already there, replace or complete it rather than stacking a second, conflicting set on top.

Step by step, part 3: verify in the page source

Publish or update the page, open it as a visitor would, and view the source. Search for twitter:card. You should find the line once, inside the head, followed by the site, title, description and image lines with the values you generated. Then open the image URL itself in a browser tab. The generator's preview is a text-only approximation and the image is not fetched. So this is the only check that the image address actually loads. If the source shows the tags and the image loads, the page is ready to share.

Worked example: the BrewLab article card

The tool's own example builds a large-image card for an article: card type summary_large_image, site handle @brewlab, title "Pour Over Coffee: A Complete Guide". The output starts with <meta name="twitter:card" content="summary_large_image"> and <meta name="twitter:site" content="@brewlab">, followed by the title, description and image tags.

On a WordPress site, that exact block is what goes into the article page's <head>. The description and the absolute image URL for that article are filled in. The example also shows the warning to respect. Leaving the image empty triggers one, because a large-image card without an image falls back to a plain card. Catch it here and the published card is the one you intended.

Limitations

The preview mock is a text-only approximation; the image is not fetched. X's real card rendering varies by client, so a tidy preview does not guarantee the rendered card pixel for pixel. X caches cards, so after you add or fix tags, posts that already exist can keep showing the old rendering for a while. And this process covers the summary card types, which suit most sites. App cards and player cards need extra platform-specific fields, and player cards need approval from X.

Common mistakes

  • Pasting tags into the post body. Card tags only work in the page <head>.
  • One tag set for the whole site. Title, description and image are per page; only the handles repeat.
  • A relative image URL. Card images must be absolute URLs, and the page must not be behind a login.
  • Stacking a second set. Check the source first; duplicate conflicting tags help nobody.
  • Skipping the source check. If twitter:card is not in the published page's head, the card cannot appear, whatever the settings screen suggested.

FAQs

Where exactly do the tags go? In the page <head>, alongside the other meta tags. If you can view the published page source and find the twitter:card line in the head section, the placement is right.

Do I need Twitter tags if the page already has Open Graph tags? X falls back to Open Graph tags when Twitter-specific tags are missing. So twitter:title and twitter:description are optional on pages that already have good OG tags. The card type and the site and creator handles have no OG equivalent in that fallback, so add the Twitter set for those.

Summary or summary_large_image: which should I use? summary_large_image suits most content pages because the wide image earns attention in the feed. Use summary when you only have a small square image, such as a logo.

Do the handles need the @ symbol? Yes, write them like @brewlab. The tool warns you if a handle is missing its @, because that is a frequent silent mistake.

Why does my card not appear when I post the link? Common causes: the tags are missing or invalid, the image URL is relative or blocked, or the page is behind a login. X caches cards, so fixes can take a while to show on old posts.

Conclusion

Adding Twitter cards to WordPress is a placement job, not a platform feature. Generate a correct tag set per page with the Twitter Card Generator. Put it in that page's <head> through the route your setup allows. Prove it in the published source before you share. When a card still misbehaves, the companion guide in the SEO Tools archive works through the failure list symptom by symptom.

Related guide: Twitter Card Mistakes: Missing Tags, Wrong Image and Cached Previews.