How to Add Twitter Cards to WordPress

If you’re sharing content from WordPress to Twitter and it’s still showing up as a plain link, you’re leaving clicks, visibility, and trust on the table. Twitter Cards fix that.

They automatically turn your posts into rich previews, with an image, title, and description, that look clean, professional, and designed to get clicked. Instead of looking like just another link, your content stands out in the feed and actually drives traffic back to your site.

This knowledgebase guide will show you exactly how to set up Twitter Cards for your WordPress site using Rank Math SEO.

1 What Are Twitter Cards?

Twitter Cards let your WordPress site links show more than just a plain URL when shared on Twitter. Instead, they incorporate additional details, such as a headline, description, and image.

That means when someone shares your blog post on Twitter (now X), it’ll appear as a rich, clickable preview or banner, not just a boring link.

Now, when users see the preview of your link, they’re more likely to trust it, click on it, reshare the tweet, and even get to know your brand, especially if your branding appears in the preview image.

There are different types of X Cards, but here are the ones you’ll most likely deal with:

  • Summary Card – shows your page title, a short description, and a small thumbnail. Simple, but way better than a plain link.
  • Summary Card with Large Image – Perfect for blog posts or landing pages. It includes a large image that spans the tweet, plus your title and description.
    An example of a Twitter card
  • App Card – Mainly for promoting mobile apps. Comes with a title, description, and direct download link. Not super relevant unless you’re actually linking to an app.
  • Player Card – Includes video or audio with an embedded player. Ideal for media content like videos or podcasts, though it requires some extra setup.

If your WordPress site runs a blog, online store, or portfolio, the Summary Card with Large Image is the one you’ll probably want. It works great for most content types and instantly makes your shared links look more professional.

2 How to Add Twitter Cards to Your WordPress Site

Now that you understand Twitter (X) Cards, let’s walk through how to make sure every link from your WordPress site shows up with one when shared on Twitter.

Step 1: Install and Set Up the Rank Math SEO Plugin

To add Twitter Cards in WordPress, you’ll use the Rank Math SEO plugin. It’s free, beginner-friendly, and honestly, the best SEO plugin in general. 

Rank Math SEO

With just a few clicks, you’ll be able to control how your links look on Twitter, and no tech skills are needed.

First, you need to install and set up the Rank Math SEO plugin on your WordPress site. Once you’ve done that, you can proceed.

Step 2: Set a Default Twitter Card for Your Site

You’ll want to make sure your entire site has a fallback X Card. This ensures that if you don’t set a custom card for a specific post or page, the default one will still be used when someone shares your content on Twitter.

To set this up, go to your WordPress dashboard and navigate to Rank Math SEO → Titles & Meta → Global Meta.

Scroll down to the OpenGraph Thumbnail section, then click the Add or Upload File button to upload your default Twitter Card image. The recommended size for this image is 1200 pixels wide by 630 pixels tall.

Opengraph thumbnail

Next, scroll to the Twitter Card Type setting and select Summary Card with Large Image.

Choose your Twitter card type

If you want your cards to come with a watermark (maybe for attribution, branding, or promotion), you can configure that in the Custom Image Watermarks section.

Click Add Image to upload the watermark image, and enter the name in the Name field.

Set custom Image watermarks for Twitter card

Then choose the position of the watermark using the dropdown.

choose custom image watermark position

You can also select a default watermark under the Default Thumbnail Watermark section. You have the option to disable it, use a play icon, or apply a GIF icon, depending on what fits your content style.

Once you’re done with your configurations, hit Save Changes.

select default thumbnail watermark

For more details on setting this up, you can refer to our detailed guide here.

Step 3: Set a Twitter Card for Your Homepage

Your homepage is often the most visited part of your site, so it’s worth giving it a proper Twitter preview, especially if that’s where most of your traffic lands.

To set this up, go to Rank Math SEO → Titles & Meta → Homepage from your WordPress dashboard. What you see here depends on how your homepage is configured.

If your homepage shows your latest blog posts, you’ll be able to configure everything right there. 

If your homepage shows your latest blog posts, you’ll see fields like Homepage Title for Facebook, Homepage Description for Facebook, and Homepage Thumbnail for Facebook. Go ahead and fill in your title, a short description that reflects your brand, and an image sized around 1200 by 630 pixels, respectively.

Even though these fields are labeled for Facebook, Twitter also uses OpenGraph data, so whatever you set here will appear on both platforms. It might sound odd, but it’s totally normal.

Customize the Homepage settings

Conversely, if your homepage is a static page, these settings won’t appear. In that case, you’ll treat your homepage like any other page and customize its Twitter Card using Rank Math’s social tab, which we’ll cover next.

Set twitter cards for your homepage

And if you ever want to switch your homepage to show your latest posts, go to Settings → Reading and select it under ‘Your homepage displays.’

After entering your content and uploading the image, don’t forget to save your changes.

Step 4: Customize Twitter Cards for Individual Posts and Pages

Now let’s make sure your individual posts and pages look great when shared on X. This is where you control what shows up in the tweet, whether it’s a blog post, landing page, or product.

Open the post or page you want to edit in the WordPress editor. In the Rank Math meta box, click the Social tab. You’ll land on the Facebook settings by default, but just switch to the Twitter tab right next to it.

Social preview

First, turn off Use Data from Facebook Tab so you can customize the Twitter preview separately.

Preview Twitter card Rank Math

Next, select your CARD TYPE from the dropdown menu, choosing Summary Card with Large Image.

choose card type

After that, upload a custom image for that post or page. If you skip this, Rank Math will use your featured image. If there’s none, it’ll fall back to the global default you set earlier

Add image for twitter card

Then, enter a title and description. By default, Rank Math pulls in your SEO title and meta description, but you can rewrite them specifically for Twitter right here.

And if you’re in a rush or stuck on what to write, there’s a Generate with AI button that can help you create something clean and optimized on the spot.

You can also overlay icons on your image, like a play button or GIF tag, to make it more engaging.

Once you’re satisfied with the preview, hit Update or Publish.

Generate twitter card info with Content AI

For more details, you can refer to our complete guide on how to properly setup the meta box social tab in your individual posts and pages

That’s it. Now your content will show up on Twitter with clean, eye-catching previews that look clickable and drive more engagement.

If anything doesn’t work as expected, or if you need help while setting up Rank Math, don’t hesitate to reach out to our support team. They’re available and always ready to help.

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Learn more about the PRO Version

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket

Related Articles