Add Twitter’s Tweet Button to WordPress, Blogger, Tumblr: Twitter has released the official Tweet Button some time ago, this is a good news for the bloggers. It is very easy to use, the javascript code is very compatible with many blogging platforms, like WordPress, Blogger, and Tumblr.
Now, how to add the Tweet Button to your blog?
Go to Twitter’s Tweet button setup page, set your preferences button.
There are three styles available:
To set the button style, change the ‘data-count‘ parameter to ‘vertical’, ‘horizontal’, or ‘none’. Look at the default code:
<a href=”http://twitter.com/share” data-count=”horizontal” data-via=”newupdate”>Tweet</a><script type=”text/javascript” src=”http://platform.twitter.com/widgets.js”></script>
Now, how to add Tweet Button to WordPress blog?
Copy the following code and paste into your single or index page.
<a href=”http://twitter.com/share” data-text=”<?php the_title(); ?>” data-url=”<?php the_permalink() ?>” data-count=”vertical” data-via=”socialblogr“>Tweet</a><script type=”text/javascript” src=”http://platform.twitter.com/widgets.js”></script>
If you’re using WordPress.com, just enable the tweet button from your admin page.
Add Tweet Button to the Blogger template.
Copy of the Following code:
<a href='http://twitter.com/share' class='twitter-share-button' data-text='<data:post.title/>' data-url='<data:post.url/>' data-count='vertical' data-via='newsupdate'>Tweet</a><script src=’http://platform.twitter.com/widgets.js’ type=’text/javascript’/>
Add Tweet Button to Tumblr blog.
Copy of the Following code between {block:Posts} and {/block:Posts} :
<a href=”http://twitter.com/share” data-text=”{Title}” data-url=”{Permalink}” data-count=”vertical” data-via=”newsupdate“>Tweet</a><script type=”text/javascript” src=”http://platform.twitter.com/widgets.js”></script>
NOTE : Change the Twitter username (red-printed) with yours.
No comments:
Post a Comment