Along with Facebook Like Button, Twitter Tweet Button should be the first thing you think about if you want broadcast your website/blog around the world. Twitter has a huge community and very potential for your SEO activities.
Let’s watch a video regarding the Tweet Button by Twitter on Youtube
By providing a easiest way for your visitors can tweet your link without leaving the page will make your visitors happy to do tweet much much more than before. And your useful contents will be updated more frequently on Twitter. The more tweet you have the more traffic will drive to your website/blog.
To add the button on your WordPress blog, you can either modify your single.php file or use a particular Twitter plugin but in this case, I recommend that you should Do it yourself to reduce the database load and increase page load performance because it’s very easy to do. Anyway, let’s take a look at 2 ways below then make your choice.
1. Do it yourself
First, you need to get the HTML script for the button, please visit: http://twitter.com/about/resources/tweetbutton
On Twitter Tweet Button page, you can custom the style, text, language, account, … After you finish, let copy the HTML code.
For example, your HTML for the button as below:
Now, it’s the main part. We’re going to make some changes in the single.php file to replace your_url and your_title by your link and your description for the link respectively. Note: don’t forget to replace your_account with your Twitter account.
Open the single.php in your WordPress Theme folder and add the following code in somewhere you want to place the button:
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo wp_get_shortlink();?>" data-text="<?php the_title(); ?>" data-count="horizontal" data-via="4rapiddev">Tweet</a>
A preview of the Tweet button on my site:
That’s all, you’re done. It’s supper easy, isn’t it. Just few minutes, you saved lot of resources. 🙂
2. Install Twitter plugin for WordPress
There are lot of Tweet Button WordPress plugins for those who are not a developer or keep it simple can choose one of my suggestions below:
I don’t have many words to share with you guys about those plugins because I suggested the first way above. However, don’t worry, the installation process is very simple. If you have ever installed any WordPress plugin, it’s the same for you.