How to add Twitter Cards to WordPress

As the popular social media site Twitter grows, the type of information users can publish there also continues to evolve. The days of the 140-character limit are behind us and the site accepts images, video clips, and other types of rich content.

Twitter Cards add richness to your tweets by integrating images, videos, audio, and download links to your tweets. Research shows that tweets that include rich media provide great boost in engagement and result in more clicks. So, when publishing content and links from your WordPress site to Twitter, it makes sense to do so in the form of a Twitter Card, rather than a simple headline and URL.

Twitter Card

Add Twitter Card support using a plugin

Twitter Cards aren’t supported in WordPress by default, but can be added quickly. The simplest method is to install a plugin. Search the WordPress Plugin repository for Twitter integration and you’ll find a multitude of options available. However, in this example, we’ll be using a popular SEO plugin called Yoast SEO. As its name suggests, this popular plugin is designed to boost WordPress’ search engine optimization (SEO) features, but also includes Twitter Card integration.

You can read more about Yoast SEO and how to install the plugin in this HostPapa knowledge base article.

Once activated, run through the first-time SEO Configuration Wizard, then head to SEO > Dashboard in the WordPress sidebar. Click the Enabled button under Advanced settings pages, then Save Changes to expose the menu required to configure Twitter Cards.

Yoast SEO settings

Now click SEO > Social in the WordPress sidebar.

Sidebar menu

In the Accounts tab, enter your Twitter username and click the Save Changes button.

Social tab

Now head to the Twitter tab. Ensure the Add Twitter card meta data is enabled, then click the dropdown menu to select the default card type to use.

Twitter tab

Choose from a Summary card or Summary with large image. Twitter makes regular changes to the types of cards available for users, so expect to see this list change over time.

Click Save changes to complete your setup. Now when sharing a URL through WordPress on Twitter, you will see a Twitter card added to your tweets. To test configuration, head to the Card Validator page on the Twitter Developers website. Enter the URL of any post from your WordPress site and then, click the Preview card button.

Validation output

If you notice any problems or if you need any help, please open a new support ticket from your HostPapa Dashboard. More details on how to open a support ticket can be found here.


Related Articles

Get online with our affordable web hosting

Get online with our affordable web hosting

Learn more now
HostPapa Mustache