This is an alternative method to setting up Summary Card with larger images for Blogger. The code is embedded in your templates post section allowing it to grab specific information about each blog post.How to set up Twitter Cards for your blogger blog ?
- Template > Edit HTML > Format Template and then search for the following
[<b:includable id='post' var='post'>]
- Paste the following code right underneath <b:includable id='post' var='post'> and change the coloured text to your own information before saving.
[<meta content='TWITTER USERNAME OF BLOG' name='twitter:site'/>
<meta content='TWITTER USERNAME OF AUTHOR' name='twitter:creator'/>
<meta content='www.YOURDOMAIN.com' name='twitter:domain'/>
<b:if cond='data:post.firstImageUrl'>
<meta content='summary_large_image' name='twitter:card'/>
<meta expr:content='data:post.firstImageUrl' name='twitter:image'/>
<b:else/>
<meta content='summary' name='twitter:card'/>
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postImageThumbnailUrl' name='twitter:image'/>
</b:if>
</b:if>
<meta expr:content='data:post.title' name='twitter:title'/>
<b:if cond='data:blog.pageType == "item"'>
<meta expr:content='data:post.snippet' name='twitter:description'/>
<b:else/>
<meta content='DESCRIPTION OF BLOG' name='twitter:description'/>
</b:if>]
- Go to the Validator here, click Validate & Apply and paste the URL of your latest blog post. You may have to request approval which shouldn’t take too long and once you get a green light, you’re all set. You should receive a confirmation email. Share your blog post links as usual and they will automatically include the appropriate card.
Hope you like this Post, Please like, share & comment
0 comments:
Post a Comment