• Become a Shouter : Join here
  • X

    How to Add Google Like Button into Thesis Theme

    By in Thesis Customization

    Today we informed you about Google launched +1 like button for blogs and we have also added this button into our blog. I’m expecting that Google +1 like button is going to be really helpful in near future to improve search engine ranking and drive traffic from your Google social network.

    Here I’m sharing a quick tutorial on how to integrate Google like button into Thesis WordPress theme. To add Google +1 button, you need to add a code into your head tag and another code to the place where you want to display Google like button.

     

    Adding Google API call code:

    So the first step is to add Google API call code which you can grab from official site.

    google-API-code

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

    Copy this code and go to Thesis site options> Stats and tracking script and paste the code there. Click on Big ass save button to save the code.

    thesis-stats

    Adding Google +1 code into Thesis theme:

    So now we have added script to call Google API and now we will add code to desire place to show Google +1 button. Now add this code into your Thesis custom_functions.php file.

    function Google_button() {
    if (is_single()) {
    echo '

    ';
    }
    }
    add_action('thesis_hook_before_headline', 'Google_button');

    Or you can grab code from here.
    Now you can see Google like button below headline of your blog post like this.

    Google-like0button

    It’s just 3 step work and you will have Google +1 button added into your blog running Thesis theme. If you are not using Thesis theme, you can grab it from below link.

    Download Thesis Theme

    Do let us know if you have added Google Like button into your blog or not?

    Subscribe Updates, Its FREE!

    Article by

    Harsh has written 1206 articles.

    If you like This post, you can follow ShoutMeLoud on Twitter. Subscribe to ShoutMeLoud feed via RSS or EMAIL to receive instant updates.

    { 20 comments… read them below or add one }

    RealTimeTricks

    Now as you are using Google+1 button i too will install it.
    I’m using thesis for my blog.

    Reply

    Sanjan Bikram

    I am really worried about this, how to add this Google +1 button in my website but finally you have solved my problem.
    Thank you very much Harsh.

    Reply

    Technology

    yes, one should add Google +1 ASAP. Hope to see better search ranking at least in our social network!!!

    Reply

    gowtham

    Great tutorial , but added it using the custom_functions option.which is better for site’s performance editing the custom_functions.php or using the Stats and tracking script?.I think custom_functions.php is better.:-)

    Reply

    Love in India

    Google +1 button is surely the new hot thing in the blogosphere. Very useful post, Harsh! I just hope this works for non-thesis WordPress themes too.

    Reply

    Anoop Sudhakaran

    I installed the button in a different way! You need not paste the javascript in the Thesis Site options, You can include the same with the rest of the code inside the custom_functions.PHP. I did a post on the same topic and have explained my way in the same.

    Reply

    Tech Blogger

    I am going to add this ‘google button’. Facebook can’t beat Google. And i am ready to remove Facebook button to support Google. ;@)

    Reply

    Pradeep Bhandari

    Looking to use Thesis in my blog but looking someone or somehow to customize it…..will use this trick to add +1 button after using it….Thanks

    Reply

    Jagan Mangat

    That is a perfect place (option) made available and very simple by Chris Pearson.

    Reply

    Atish

    +1 Button is too good ..i too added this feature . Also wrote an article how to add it in wordpress blogs.

    Reply

    Bhawan Virk

    Thanks for this tutorial.

    Reply

    Nidhi

    Nice tutorial. I will also add the same to my website. Thanks

    Reply

    Rahil nm

    oh great article harsh
    you help me place this code
    thanks

    Reply

    karthik

    yesterday i tried to add but not done with this post i successfully added to my site thank you :)

    Reply

    Elizbath

    “WordPress plugin – Google +1 Button” can also be used for that…to avoid code pasting

    Reply

    Shyam S. Sharma

    Here is plugin available for add +1 to wordpress blog.

    http://wordpress.org/extend/plugins/google-1/

    Reply

    Vijayraj Reddy

    i think now based on the +1 they will change search engine ranking..

    Reply

    Kathy

    Harsh,

    As always most simplistic with the tutorials…
    Wonderful and easy to incorporate.

    Lets see how far this new sharing feature goes.

    Reply

    bdkamol

    Great tutorial. I added this ‘google button’ in my blog. Thnx 4 sharing.

    Reply

    Bhaveek

    Harsh, I have remove the “echo” from the code as it was showing in the posts. Can you please tell how we can add google +1 button on teaser posts.

    Reply

    Leave a Comment

    Previous post:

    Next post:

    `