Till now we all were using the twitter share buttons powered by tweetmeme. Now Twitter has officially released the twitter share buttons for its users. So it’s the time to replace the tweetmeme button with official twitter share button on your blog.
In this post I’ll share a tutorial to easily add official twitter share button to your blog. The official twitter share button is available in three styles and it uses the new URL shortener t.co
How To Add Official Twitter Share Button To WordPress:
- First copy the following code and replace tricksdaddy with your own twitter user name.
- Now sign in to your WordPress Dashboard and go to Appearance -> Editor and select single.php file.
- Paste the copied code into single.php file wherever you want your code to appear. The most appropriate place for the code is above <div class=”entry”>.
- Save the file and refresh your blog. Now you can see the new official twitter share button on your blog.
The twitter button is available in following styles:
If you want the horizontal or no count button then simply change the text vertical in the code (Step 1) to horizontal for horizontal button or none for no count button.
If you want to align the button to left of your post then change the text float:right to float:left in the code.