Twitter recently rolled out its official Tweet buttons using which you can directly tweet about any webpage. In this tutorial, I will explain how you can add the Twitter Tweet button to your WordPress or Blogspot blog. The procedure is nearly the same for adding it on any website.
Get the Twitter Tweet Button code
Go to Twitter > Goodies > Tweet Button
Choose the button you want and copy the generated code.
This is the sample code for the horizontal Tweet button with the tweet count.
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="pathik">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Add Twitter Button to WordPress Blog
Open your WordPress hosting account and navigate to wp-content/themes/yourthemefolder
Assuming that you want to add the code to every blog post, open single.php and edit it.
Add the code wherever you want the button to be displayed.
Alternatively, you could also add the Tweet button to your sidebar. Just login to your WordPress Dashboard and go to Appearance > Widgets.
Add a new Text widget to your sidebar and enter the Tweet button code there.
Add Twitter button to Blogspot Blog
Log in to your Blogger account and click on the Design tab. Select Edit HTML and add the Twitter button code wherever you want it to appear.
If you aren’t good with HTML/CSS, you can also just go to Page Elements in the Design tab and click on Add a Gadget.
Select the HTML/Javascript widget and add it to your sidebar. In the content tab, just add the Twitter button code.
You should see the Tweet button on your blog/website. Click on it and send a test tweet to check if it’s working or not.
Similarly, you can also add a Facebook Like button to your WordPress and Blogger blogs. Check out this tutorial – Add the Facebook Like Button to WordPress
Recent Comments