AUSTRALIAN SOCIAL MEDIA STATISTICS  |  SOCIAL MEDIA AGENCY  |  SOCIAL MEDIA EVENTS  |  INSTAGRAM NEWS

How To Setup Twitter Cards for WordPress

on February 5, 2013 | Twitter WordPress | Comments (12)

As Twitter becomes one of the main content distribution platforms many of us now use to consume media on a daily basis – publishers and marketers should look at every possible avenue to give their content the highest chance of success and share-ability.

One way to give your content extra prominence on Twitter is by implementing Twitter Card support.

What exactly does this mean? When you preview a tweet with Twitter Card support you can see a preview of the content, author and picture.

Eg this Tweet by SAI:


So how exactly do you implement Twitter Cards? There are a few plugins you can use in WordPress but it’s always best to avoid plugins if possible.

The code to implement Twitter cards is rather simple. You need to place 7 unique Twitter fields in the <head> tag of your website.

1. <meta name=”twitter:card” content=”summary”/>

Leave this field always as summary. This means you will show a summary of your content, including both text and picture.

2. <meta name=”twitter:creator” content=”@SMN_Australia”/>

This next field is the Twitter username of the author/ writer / creator of the content. With a few simply WordPress PHP scripts you can pull the authors Twitter handle into this field.

3. <meta name=”twitter:site” content=”@SMN_Australia”/>

This field is the Twitter account of the website. This can be hard-coded to be always the same value as it will never change.

4. <meta name=”twitter:url” content=”https://www.socialmedianews.com.au/social-media-statistics-australia-january-2013/”/>

This is the URL of the current page and simple Get Permalink WordPress PHP function will do the job quickly and easily.

5. <meta name=”twitter:title” content=”Social Media Statistics Australia &#8211; January 2013″/>

This is the title of the current page and simple Get Title WordPress PHP function will again do the job.

6. <meta name=”twitter:description” content=”It is now time to report our Australian social media statistics for January 2013.Summer holidays in Australia has a significant impact on the social networking sites we use. Generally over the December holiday period we see …”/>

The description field is a short summary of your content and can simply be pulled using the WordPress excerpt PHP function.

7. <meta name=”twitter:image” content=”https://www.socialmedianews.com.au/wp-content/uploads/2013/02/socialmedianewsaustraliaiphoneapp.png”/>

The last field is the image to show in the summary. To suffice simply pull the first image attached to the post, or a featured image. If not suitable then hard-code a generic image to be used as a backup.

One you have setup the code, test it on the Twitter Card Preview Tool.

Twitter then will show you a preview of your Twitter Card:


Looks good? Now apply to Twitter to have this functionality turned on for your website. You will need to fill out this Twitter Developer Form. You will have to wait for approval from Twitter before this goes live.

Any publisher than uses Twitter as a marketing avenue will benefit from this tweak. It may also be worth for larger social media agencies and consultancies to implement this and get their content standing out even further.

If you don’t know your way around WordPress PHP functions – you could download one of the many Twitter Card WordPress Plugins, or you could hire me and I’ll do it for you.


David Cowling : Editor and Founder of SocialMediaNews.com.au. I also run a Social Media Agency where I do consulting work and another blog dedicated to Instagram news. Connect with me: Twitter | LinkedIn | Google + or contact me here. Alternatively, you can send me an email at david@socialmedianews.com.au

  • rob towner

    Wow. thanks for this. extremely helpful

    • Guest

      PS. Anyone know any reasons why someone wouldn’t get approved by Twitter to have cards on their site?

      • David Cowling

        I think Twitter only want to do this on big news websites/ publishers/ big name companies. So go to the effort to make sure your site is looking as professional as possible for the approval process.

        I am still waiting for my site to be approved (submitted for approval 3 days ago).

  • Wow. thanks for this. extremely helpful

    • PS. Anyone know any reasons why someone wouldn’t get approved by Twitter to have cards on their site?

      • David Cowling

        I think Twitter only want to do this on big news websites/ publishers/ big name companies. So go to the effort to make sure your site is looking as professional as possible for the approval process.

        I am still waiting for my site to be approved (submitted for approval 3 days ago).

  • Sarah

    Thanks for your post. Do you know if the lead generation card is available as yet? https://blog.twitter.com/2013/capture-user-interest-lead-generation-card

  • Sarah

    Thanks for your post. Do you know if the lead generation card is available as yet? https://blog.twitter.com/2013/capture-user-interest-lead-generation-card











MONTHLY NEWSLETTER SIGN-UP