WPTemplate.com

How to Add Google Plus Button to WordPress?

The introduction of Google +1 button is a very significant step forward by Google and it is going to be a favorite of webmasters. There is so much of networking power in a simple button, and this is precisely why webmasters want to quickly jump on to the networking bandwagon and seek the multiplier effect in terms in inbound traffic because of such efforts. In this tutorial let us see how the WordPress blog can be easily modified to add the Google plus button without any plugin.

As the first step, the footer template of your theme must be provided with a snippet of code before the <body> tag. For that, click the Appearance>Editor in your WordPress Dashboard.

Then, select the footer.php file from the list on right hand side. If we add a piece of code here that will enable the Java Script from Google’s server to manage the functions of the Google+ button. As the next step copy/paste the code given below above the <body> tag in the editor.

%MINIFYHTML2de7c840590a6668af52a4d903f53cb810%

Under the code find the Update File button and click the same.

In case the footer.php file is not accessible or you are unable to find the <body> tag in the editor the following code is to be entered in the functions file of the theme.

function show_google_plus_one()

{echo \'%MINIFYHTML2de7c840590a6668af52a4d903f53cb811%\';<br>

}<br>

add_action(\'wp_footer\', \'show_google_plus_one\');

Finally you have to select the button and add the same to your site. You can choose your button easily by creating a custom button. For that you may visit Google+1 website. Do not delay if you have not yet got your WordPress project a Google +1 button.

As the last step, you have to insert the code on your website. The ideal place for the button is top of the individual posts. However, it is your choice as to where the button should appear. After identifying the location for the button select the single.php from the right side menu of Appearance>Editor in your Dashboard. Paste the code from Google+1 button website exactly at where you want the button to appear. Now, click the Update File button. This is a simple way of adding Google +1 button to WordPress site.

Add Google Plus Button to WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *

12 − 1 =

Scroll Up
1000's of Wordpress Templates at Great Prices: Visit ThemeForest