WordPress Tutorial

How to Add Twitter Cards in WordPress

Twitter Cards can be one of the solutions for driving traffic to your website. How? Twitter Cards allow to attach rich media to tweets that link to your content. In order to be able to use this feature, you need to implement it to your WordPress website first. In this tutorial, you will learn how to add Twitter Cards to WordPress using WordPress SEO by Yoast plugin.

What you’ll need

Before you begin this guide, you’ll need the following:

  • Access to WordPress admin area

Step 1 — Installing Yoast SEO plugin

Access WordPress admin dashboard, click on Plugins (1) -> Add new (2). Now, in the search bar type Yoast SEO (3). In the search results you will see Yoast SEO with traffic light in light blue background. Click on Install Now (4) button. Once the installation process is finished, Activate (4) will appear instead of Install (4) – click it.

Find and install Yoast SEO plugin

Step 2 — Configuring the Plugin

Now, since the plugin is installed and activated, in the left corner you will see SEO (1) button. Once you click it, a SEO Dashboard will appear. Now, click on General (2) section. The configuration of Yoast SEO can be started by clicking on Open the configuration wizard (3).

Entering Yoast plugin configuration

Step 4 — Filling in you details

At the form that has been opened, fill in your personal details.

Note: it is not obligatory to fill all of the fields. For example, in Social profiles you can write just a single one, if that is all you need.

Filling your details for Yoast

Step 5 — Enabling Advanced Settings Pages

Click on SEO (1) again. At the top click on Features (2). Only the first line of the three will not be enabled – you need to switch to Enable (3). Once you do this, click on Save changes (4).

Enabling advanced settings

Step 6 — Filling in Account Details

More options will appear. You need to click on Social (1). Once you do that, in Accounts (2) section fill in the data you wish. To be able to use Twitter Cards, you must write your Twitter username and click Save changes (3).

Entering Twitter username

Step 7 — Selecting the Type of Twitter Cards You Wish to Use

Click on Twitter (1) section and Enable Twitter Card meta data. At the drop-down menu The default card type to use (2) you can select which type of Twitter Cards you would like to use. By default Summary card is selected, which is the best option for WordPress blogs. Once that is done, Save the changes (3).

Selecting Twitter card type

Step 8 — Updating Your Profile

In this step, you need to update your profile with Twitter username. Click on Users (1), select Your profile (2) and write your Twitter username (3). Don’t forget to click on Update Profile at the bottom of the page.

Updating your profile

Step 9 — Validating Twitter Cards

Now, it is time to check how Twitter Cards work. Go to Twitter Validator,paste a link (1) from your website and click on Preview card (2). On the right side you will see how the generated Twitter Card would look like.

Twitter card validator


In this tutorial you have learned how to add Twitter Cards to your WordPress website with the help of Yoast SEO plugin. Not only have you increased the chances of getting more traffic to your website, but also the tweets will be more eye-catching.

About the author

Domantas G.

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get Exclusive Content

Join thousands of webmasters who get our free newsletter with tips on how to drive more traffic and revenue to their websites!

Please wait...

Thank you for sign up!

More in WordPress Tutorial
How to Create Staging Environment for WordPress