The Google +1 button is a similar concept to the Facebook Like button. Facebook is a much bigger social market, but the Google +1 button may affect Google search results and rankings. Google also takes into account all social signals on your site, so implementing this feature in your WordPress site is worth it.
While you’re at it, in order to maximize your social media exposure you should also integrate a Facebook Like button and Twitter Cards with your WordPress site.
Adding Google +1 to WordPress
First of all, you should check the Google +1 developers page, which is basically a central page for the Google+ platform. You can get the +1 button code from there and you also get a number of additional options, language, dimensions, documentation and more.
Now, back to your blog, you need to edit your footer.php file and add the following code:
Alternatively, if you’re using a theme framework and don’t have access to the footer.php file, you can use the functions.php file instead.
Add the following to the functions.php file if you can’t edit your footer.php file:
function add_googleplusone() {
echo ''; } add_action('wp_footer', 'add_googleplusone');
Tweaks
You can tweak a few of the button’s properties. First, the size can be changed. It ranges from small to tall in 4 gradations. Depending on which one you want, use the following lines of code:
//Code to paste for the Tall Button //Code to paste for the Standard button //Code to paste for the Medium Button //Code to paste for the Small Button
You can also choose to show the count on the button (number of +1’s) or not:
False means that no numbers will show. Also, if you’re using the tall size, the count will not be shown either, regardless of whether you choose true or false. This is because of space constraints.
Now, you can keep track of your Google +1’s and hopefully, soon enough, these up votes will boost your rankings as well.