How To Add Twitter Cards in WordPress

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.

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.

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

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.

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

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

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“.

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.