Pages

Wednesday, June 1, 2011

How To Add Google +1 Button to Blogger

View Comments

I just caught the news about Google making available the new +1 Button.

If you want to understand the value of the Google +1 button, here's a quick video that Google put together:

As an end user, I'm still not sure about the value, but as a content publisher it might help my search rankings and make my content more discoverable so I figure I would add it to Connections and my Blogger blogs. (more on Connections in a follow-up post).

Adding the Google +1 button to Blogger is pretty easy. Once you follow these instructions, it'll show up on your page similar to this:


Here's how you get it done:

  1. Go to Blogger.com
  2. Log in with your account if you haven't yet
  3. On your Dashboard, click the Design link for your blog you want to modify
  4. Near the top of the page click on Edit HTML
  5. Now on top of the text box, click the Expand Widget Templates checkbox
  6. Find the line that contains </body>
  7. Just before that tag, add the following code:

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

  8. Now search for post-body and you should find something like this:

    <div class='post-body entry-content'>
    

  9. Immediately after that line, add the following code:

    <div class='post_share social-media'>

    <div class='wdt_button'>

    <g:plusone expr:href='data:post.url'/>
    </div>

    </div>
  10. Now look for .footer-outer { and you should find something like this:

    .footer-outer {

    color:$(footer.text.color);

    background: $(footer.background);

    ...



  11. Just before that line add the following:

    /* Social share styles

    ----------------------------------------------- */

    .social-media {

    width: 90px;

    }

    .post_share {

    float:left;

    }

    .post_share .wdt_button {

    clear:left;

    margin:0;

    }

    .wdt_button {

    padding:5px;

    }



  12. Click Save Template and that should do it.

To see how to add the Twitter and Facebook Like buttons to your Blogger blog, see this post.

Enjoy!

blog comments powered by Disqus