Back in January 2011, Google unveiled their new +1 button. The button is meant to get people sharing things with their friends, contacts, and whoever else they communicate with on the Web.
The push is all part of Larry Page’s social strategy (the one that determines 25% of Google employees’ annual bonus). Make no mistake, Google is trying their hardest to compete with the likes of Reddit, Digg, StumbleUpon, Facebook, and even Twitter. Their latest creation may do just that. But how do you get in on the action? Well, if you’re a self-hosted WordPress blogger I’ve got your answer.
First, you’re gonna need a plugin called sharebar (link). Once installed head over to its settings and click “Add New Button”

Next, go out to Google’s Webmaster page and get the buttons you need. I created small and large sized buttons since Sharebar can handle both.
Copy the second line of code <g:plusone size=”"></g:plusone> for each button and paste it into Sharebar’s settings. Give the button a name, a position on the Sharebar, and check the enabled box.

The last step has two options. You can add Google’s auto-generated <script type=”text/javascript” src=”http://apis.google.com/js/plusone.js”> </script> to the <head> of your theme’s header or before the </body> in the footer. Or, you can use an alternate code snippet only in the footer. The alternative was written by Aaron Peters, a web performance optimization consultant, who says Google’s auto-code is not optimal because scripts block rendering when placed in the <head>, redirect from HTTP to HTTPS, browser caching issues, and the JS file is not minified. I’ve opted to use his code (below) and it works perfectly. If you don’t feel like heeding his advice you should stick with the Google generated one.
<!-- via Aaron Peters. Place this just before your close </body> tag -->
<script>
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = 'https://apis.google.com/js/plusone.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
That’s it. You’re all set. Now when people visit your blog they can click +1 to publicly give it their stamp of approval. Google thinks that +1′s will help people find the best stuff when they search, and that stuff with then be linked to their Google profile. There’s no telling how the whole +1 thing will play out seeing how I replaced the Google Buzz button with the +1 button, but Google has a way of eventually getting things right. We’ll just have to wait and see. In the meantime, feel free to +1 this post so your friends can check it out.
To learn more about how Google +1 works check out Google’s intro video:
Some people have put the script in with the button size code, bypassing the footer/header altogether. If you try that and you run into problems then stick with the advice above. I’m not using the Sharebar currently as my theme mucked with their settings which conflict with the plugin. If you have any questions feel free to leave ‘em below or send me an e-mail at me@y2kemo.com. There’s an updated version of Sharebar called Cevhershare that comes preloaded with Google+.

















Pingback: 9 Essential WordPress Plugins | CyClops Labs