Add plus one button to WordPress site

Add plus one button to WordPress site


There is no official WordPress plugin yet that lets you add  the plus one button to a WordPress site, but there is a way to do it. You just have to edit the code snippet from Google a little before you insert it on your WordPress site.

How to add plus one button to a WordPress site

If you just want the button on the single pages and posts, it is easy, you just needs to insert the code straight the way Google gives it to you here. (I told you how here)

But if you want it on the blog-page, the archive pages the tag pages and all the other pages on your WordPress site, you have to modify it a little before you insert it. But it is easy, change the code to this before you insert it:

<g:plusone size=”tall” href=”<?php the_permalink(); ?>”></g:plusone>

Put that snippet in single.php, in page.php, in index.php, in category.php, in archive.php and in all the places you want it. Be sure to put it in the WordPress loop (just above <?php the_content(); ?> for example).

And be sure to add the javascript in the header too. This: <script type=”text/javascript”src=””></script>

Add plus one button top WordPress

You can as well change the word “tall” to “medium” or “small” if you want another design of the button.

That easy it is. Good luck and remember to “plus-one” the posts you like!


  • A Joomla plugin is already available. I hope this is a pleasant surprise from the Joomla community? Read more about the plugin here:

    • Aha! Great! Then it will not last long until there is a plugin for WordPress as well..:)

  • Anonymous

    Whether there is an ‘official’ plugin is a little irrelevant. Many people like to code so this is useful info

  • Jonathon,

    many thanks. I’ve used your snippets to include in my blog. Seems to work fine.
    David Burdon

  • Jonathan,
    saw your Tweet about increased traffic. I’ve just given you a mention on WebProWorld:

    • Thank you! 

      When checking Analytics I saw that I got some visitors from too! 

  • Anonymous

    Thanks for this, I’ve been wondering how and when I’ll use the Google +1 feature. I’m also wondering how to link to HotPot reviews and associate a locality based business to their Places Page. In some way, all this will need to be tied together eventually.

    • You´re welcome! Yeah, Google is messing with so many things now, I wonder where it will end up..:)

  • Hi





  • GardeningHater

    I was recommended to your blog from WebProWorld to read about installing the +1 button, and found this a very helpful post.

  • שגיב אמרי

    Love it! thanks alot :)

  • thank you

  • I couldn’t figure this out. So I found an easier way:

    1. Go to Appearance and then Widgets
    2. Find “Texts” which is for HTML code.
    3. Drag it over into the sidebar
    4. Paste the Google+ snippet
    5. This works for the whole site, at least on mine it appears to

    But I couldn’t figure out how to get it to work on a single post. I pasted the code into a single post, and nothing shows up. Something is interfering.

    • Yes, that works as well. But then when clicking the button, you “plusses” the main domain, not the post you are in. Now there are plugins as well, if you want to add it to single posts in an easier way..

  • Haroon_083


  • very Nice .. Thanks

  • thanks for posting

  • Ms Thảo

    well come to view mys plus:

    Angry Birds birthday

  • David Johnson

    I use the sharbar plugin and it allows you to easily add the plus one

    • Yes it does. But sometimes you want more flexibility, and then this trick is good to know about! :)

  • Thanks for post. I put the code in the single.php. I hope it wort it.

  • That was easy! Thanks, I managed to make one for me.

  • I am just a simple Mom Blogger and I came across your site when I was looking for help on how to do this. Was able to succeed thanks to your straightforward directions! Thanks. And if you could do a post for the Facebook Like and Tweet buttons (like you have above) so I don’t have to use a plugin, that would be great! Thanks again for a great post.

  • jinjinchou

    want some girl pictures to look at ?
    here are 1000 pictures of Japanese Girl Gravure Photos

  • Angelica Mendoza

    I am going insane. I don’t know much about code, but I would like to get this right. I tried using the javascript you posted above, but It would not work. I had to paste the following javascript from Google Webmaster Tools in the header to get my button to appear on my site

      (function() {    var po = document.createElement(‘script’); po.type = ‘text/javascript’; po.async = true;    po.src = ‘’;    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(po, s);  })();  I have the plus one button on my site now, but I cannot get it to work properly. I get a red exclamation point when I click the button. I haven’t blocked 3rd party cookies, and I am able to use the plus one function on other sites. I am stuck. Please help.

    Thank you!

    • Nathan

      I get the same results, the red exclamation arrow. Perhaps the href code is no longer supported by Google for some reason?

  • Love it! thanks alot :)

  • This information is very useful I added it to my blog..

Download new responsive WordPress template

New responsive WordPress template with big call-to-action-areas, header-slider and different color-themes. It is built on Bootstrap and named Strap Them Boots On. Read more and download!

The one writing here:

Important information

This is the search engine optimization (SEO) and web tactics webiste/blog for Jonathan Björkskog, working at and co-owning Genero Digital Agency, a digital advertising agency based in Helsinki, Finland. If you searched for my Swedish blog, you find it here:

That's one of my passions.

If you were searching for the other one, kitesurfing, you should check out my kitesurfing blog instead.

Follow on Facebook

Head over to the wall and send me all your questions about Facebook, SEO, or any other awesome topic on the internet!

Premium SEO-Plugin

Brian D. Hawkins about SEOPressor:

It’s almost as if SEOPressor took those features from my checklist. I guess I’m old school but I have a checklist that I use when writing new posts. It’s pretty cool that SEOPressor helps automate some of those tasks and the check/remind feature is very nice. As usual I love your presentation.

Click Here to Download
Read my SEOPressor review