Site icon David Yin's Blog

How to Add +1 Button for particular URL

Yesterday, I post it to show how to add a Google +1 button.
It is easy when you just want the button for the page or URL which contain this button.

<g:plusone></g:plusone>

There is still some case like this. I have a page with the list of Posts. I would like to add +1 button to every post link.


Not hard, just add URL into the code:

&lt;g:plusone href="https://www.yinfor.com/2011/06/how_to_add_google_1_button.html"&gt;&lt;/g:plusone&gt;

So I put a +1 button on the navigation bar on the every page, which all point to my blog root.
I used code as below.

&lt;g:plusone href="https://www.yinfor.com/blog/"&gt;&lt;/g:plusone&gt;
Exit mobile version