How To Add Google Plus 1 (+1) Button In Thesis Theme

google plus 1

google-plus-one-button

Adding Google plus 1 or +1 button in Thesis Theme is very easy we can do it without using any plugin. I will tell you on how to do it before that we need to know the benefits of adding Google +1 button in our website.

Uses of Google Plus 1 Button :

If you click on plus one button for a particular topic then it helps your friends, family and others on web to find the best information. These are the recommendations that shown to the users only when they search for topic by signing in to the Google profile.

I already added Google Plus 1 or Google +1 button in my website and i am using Thesis theme. So i want you to help other bloggers on how to add this plus one button in Thesis theme.

Adding Google Plus 1 Button in Thesis Theme :

Go to your Dashboard by logging in to your website then go to Thesis Site Options, in that under Stats Software/Scripts section add the below java script code.

<script type="text/javascript" src="http://apis.google.com/js/plusone.js"> </script>

 

google_plus_one button

After adding that code then click on Big Ass Save button.

Next step is add this code in your custom_functions.php file

function Google_button() {
if (is_single()) {
 echo '<div style="float:right; padding-left: 5px;"><g:plusone></g:plusone></div>';
 }
}
add_action('thesis_hook_before_headline', 'Google_button');

Note : Please backup this file if something goes wrong then it helps you

The above code will makes to display Google +1 Button on each and every post title and another option is you can also use Thesis open hook plugin to place the code at particular place in your Thesis theme or just simply you can add this short html code at any place

<g:plusone></g:plusone>

google_plus_one_ex

if you want to display plus one button like box count then add this code

<g:plusone size=”tall”></g:plusone>

I hope this adding Google Plus 1 tutorial will helps you and let me know that you added this on your blog or not?

 


Posted on by karthik in Blogging Tips, Tutorials Comments