Add Google’s plus 1 button to your wordpress site

Add Google’s plus 1 button to your wordpress site

+1 button
plusonebutton

Learn how you can add google’s plus 1 button to your wordpress posts which will allow visitors to your website to recommend your content to their friends.

Google added a feature to search results that let’s you recommend search results to your friends. It’s called Plus 1 (+1) and you can now include it on your own website which allows your readers to “recommend” the page their viewing to their friends (and to google!).

Here’s how you can add the Plus 1 button to your wordpress site.

In order to add the Plus 1 button to your wordpress posts you need to add it to ‘single.php’.

<!-- Place this tag where you want the +1 button to render -->
<g:plusone count="false"></g:plusone>

<!-- Place this tag after the last plusone tag -->
<script type="text/javascript">
  window.___gcfg = {lang: 'en-GB'};

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

From your wordpress dashboard, go to Appearance and select ‘Editor, then single.php. Open up your favourite text editor and copy all of the text in single.php and save it, just in case something goes wrong!

Once here, find this bit of code:

<?php arras_postheader() ?> (It might be different for other templates)

and paste the the code google suggest immediately after. It should look something like this:

<?php arras_postheader() ?>

<!-- Place this tag where you want the +1 button to render -->
<g:plusone count="false"></g:plusone>

You might need a little bit of trial and error, but that’s how I got the plus 1 button to appear my posts on this blog.

Source: http://www.google.com/webmasters/+1/button/

You might also like

Copywriting Tips

Copywriting Tips

Copywriting is the art of writing persuasively with the intent of driving an action. Therefore your writing should focus on your desired outcome. Follow these

Read More »