How To Set Up Twitter Cards on WordPress Without Any Plugin

1 answer

Staff February 5, 2015

I will explain you very quickly, no need to install any plugin and overload your WordPress.

<meta content=’summary_large_image’ name=’twitter:card’/>
<meta content=’Yourtwitter username name‘=’twitter:site’/>
<meta content=’Probably your twitter account or websites‘ name=’twitter:creator’/>
<meta content=’your website Url‘ name=’twitter:domain’/>
<meta content=’your twitter url’ name=’twitter:url’/>
<meta content=’<?php bloginfo(‘name’); ?><?php wp_title(); ?>’ name=’twitter:title’/>
<meta content=’<?php $image_id = get_post_thumbnail_id();
$image_url = wp_get_attachment_image_src($image_id,’large’, true);
echo $image_url[0]; ?>’ name=’twitter:image:src’/>
<meta content=’<?php echo strip_tags(get_the_excerpt($post->ID)); ?>’ name=’twitter:description’/>

Once you have added this, login to Twitter go to –>
and then paste a url from any post then click preview if you are doing this for the first time request domain for approval.

By next few minutes you will get a mail confirming the domain has been approved.
Check after the approval do the same go to
And paste the url of any post by this time you it should be all fine, you will see the thumbnail of your post.

Let us know if you still do not see.


Please login or Register to Submit Answer