Facebook and Twitter buttons are all the rage lately, providing an easy way for your readers to quickly share your posts on the social media sites with nothing more than a click, as well as seeing who else has done the same. Take note that these counters are different from the Facebook Like Button.
Fortunately, adding these buttons is very simple and requires little technical skill.
Using ShareThis to do the leg work
To add the Facebook counter to your website, all you need to do is add a little code to two of your theme files (header.php and single.php). To get the specific code for your website, head over to ShareThis and follow these instructions:
- Select “Any website”
- Choose “Horizontal Counters” (or other if you would prefer)
- Select the style on the left (not the ShareThis button)
- Hit “Get The Code Already”
- You’ll now be prompted to register an account – it’s quick, easy and spam-free.
- The next page will give you two lots of code: the top piece of code needs to be inserted in single.php, wherever you want the button to appear (probably before or after the content). However, if you don’t want their email and share buttons, just remove the following from the end of the code provided:
The second piece of code needs to inserted in your header.php file – just before the tag will do perfectly.
It’s as simple as that. Now refresh one of your posts and check that it’s working properly.