Most of the bloggers use WordPress as a blogging platform. If you are one of the wordpress users, then this tutorial is specially for you. Before you start know more about Twitter Cards. Twitter Cards will display a short summary about the blog post inside every tweet if you enabled twitter cards on your blog. Check the below screenshot to know how twitter cards will display. You can see the live example by going to our twitter page.


Benefits of Twitter Cards :

If someone share your website/blog URL in twitter without mentioning the official twitter account of your blog. Don’t worry. Once you enabled twitter cards on your blog/website, twitter will start display the cards when the URL of the blog/website is shared. As i said earlier you can see the twitter account attribution in the summary. Hence the people can to know that the URL belongs to the particular Account/Website.

Lets see how to enable Twitter Cards on your WordPress blog. I have listed 3 different options to add twitters cards in wordpress sites. It will not take more than 30 minutes to enable twitter cards on wordpress sites.

Option 1 : WordPress SEO by Yoast Plugin

If you’re the WordPress SEO by Yoast Plugin user, then it makes the process easy.

Download and Install WordPress SEO by Yoast Plugin

1. Go to the “Social” page in WordPress SEO “settings“.

How to Add Twitter Cards in WordPress  (2)

Then navigate to the “Twitter” tab.

2. Check “Add Twitter card meta data” and it will add the meta data to the site’s <head> tag section.

3. Under “Site Twitter Username” , specify the twitter username of your site.

E.g.: techtolead

and choose the card type as “Summary

4. Click “Save Changes

How to Add Twitter Cards in WordPress  (3)

5. Now go to the profile page in wordpress. Here new field under contact info was added, enter the twitter username of your own.

If you check techtolead tweets you can the author as @ashokudhayan and it also has @techtolead as a publisher website.

Option 2 : JM Twitter Cards Plugin

JM Twitter Cards is a wordpress plugin developed especially to add Twitter cards to wordpress. This plugin was developed by Julien Maury. I recommend to use this plugin for twitter cards, because when compare to WordPress SEO by Yoast Plugin, JM Twitter Cards Plugin allows you to select different types of cards like summary,summary with large image, photo and app. But in WordPress SEO by Yoast Plugin you have only two cards summary,summary with large image. I’m using JM Twitter Cards Plugin in T2Lead. You can also customize the size of the thumbnails.

Download and install JM Twitter Cards Plugin.

1. Once installed, Go to the settings page of the plugin.

2. See the current settings of techtolead below under “General” column

How to Add Twitter Cards in WordPress  (5)

3. Apart from “General” column, rest of the fields you can choose according to your need.

4. Once done, Click “Save Changes“.

Option 3 : Manually add meta code :

This option needs code edit, which means you need to manually the meta code of the desired twitter card to your tag. Please note that you have to add the meta code to the header.php file of your currently active wordpress theme. If you change the wordpress theme, then you have to do the steps again. Before you edit your header.php, please backup the file and be careful on editing the code.

1. Go to the “Appearance” -> “Editor” and choose the header.php file.
2. Add the code of your twitter card before the </head> tag.
3. Save the file.

I will not recommend option 3 anytime. Try it on your own, because it involves code editing, if you edit the wrongly then it will affect your site.

How To Validate & Apply for Approval:

By using any one of the option, you have just added twitter cards meta data to the wordpress site. After this process, you have to validate the URl of the website and apply for approval. After the approval only the twitter cards starts display in tweets when the URL of the wordpress site shared on twitter.

1. Go to Twitter Validator  and login with your website twitter account.

2. Select the desired card for your wordpress site and now click on “Validate & Apply” tab.

How to Add Twitter Cards in WordPress  (6)

3. Paste the URL of the wordpress website and click “GO“.

How to Add Twitter Cards in WordPress  (7)

4. This process will validate whether the URL has the meta tag for twitter cards or not. If you see the proper preview of the card, then under the URL you can see your website name with not approved. Click on “Request Approval“.

How to Add Twitter Cards in WordPress  (1)

5. This process takes you less than 15 minutes. After sometime try sharing your URL and you can see the cards on the tweets.

No more waiting, Enable Twitter Cards on your wordpress site now.

Feel free to post your questions/comments. If you like this tutorial, don’t forget to follow us on Facebook and Twitter.