If you have requested for an invitation for Google plus 1 and your site is good enough to be considered by Google for their plus 1 button,they might have sent you an invitation for their plus 1 button which might become Facebook like killer in the near future . Read our previous post on Google plus 1 button .

How to add plus 1 button to wordpress homepage :

  • Add this code on your header of the site,just open the header.php and paste the code between the head tags .
<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
  • Now, for inserting the plus 1 button on your homepage or any other page in wordpress, you will need to just put the following code in the theme file :
<g:plusone href="<?php echo get_permalink($postid); ?>"></g:plusone>

 

We have previously written about how to add Twitter button on your homepage and how to add official digg button with plugin ,you can check that too .

 

 

Do you like this post?

About

Bishwajeet Mahato is the Founder and CEO of Comptalks, an online portal and offline college magazine.He loves writing about technology and helps people solve their computer related problems. Nowadays, he is also interested in digital marketing and has worked for several top notch companies. Follow him on Twitter @mahato99

Comments:
  1. Barbara Ling, MamaBear

    I just added it meself to my site; you can also hack plugins you use to have it show up correctly. Should be interesting to see how it flies….

  2. Kent Chen

    I think this is great, another great feature that has a viral element to it

  3. hanyhussain

    hey .. great article :)
    i want to add this button im my blog thanks for sharing this information .

    Computer Free Tips

  4. nate

    Thanks so much, the updated code <g:plusone size="medium" href="”>

    fixed the issue I was having…great idea to include the permalink to the post thank you!!!

    Nate.

Leave a Reply

(required)

(required)


Copyright © 2008-2012 Comptalks - All Rights Reserved.