HOW TO: Create a Google +1 Button for a Static webpage? - latest tech tips

Ad Spot

Place your Ads here!

Post Top Ad

HOW TO: Create a Google +1 Button for a Static webpage?

Share This
Google +1 is gaining huge importance in SEO and most of the scripts avaiable on the internet are ment for dynamic dynamic url's as in +1 will be applicable for the webpage link the visiter is currently on.

What if you wanted a Google +1 button just for a single static constant URL i.e the home page of your website? Well that is also possible all you have to do is replace the link of your blog in the red font mentioned in below code snippet.



<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="tall" href="http://www.yourblogname.com/"></g:plusone>

<!-- Place this render call where appropriate -->
<script type="text/javascript">
  (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>

 

Copy paste the above code snippet wherever you want the Google +1 button to render.

If you observe closely you will see two +1 buttons. 1 at the left at the floating side bar (that one is for this page) and the other one is at top of the page. That +1 button is for this blog latest-techtips.com.

Just in case you want to do further customization then you can simply go to this link from Google and do further customization and then place the code. Don't forget to add the website link in Advanced Options.


Lastly don't forget to +1 this page and also the blog if you liked the article and it helped you. This code will work on Blogger Blogspot, Wordpress or any HTML platform.

Post Bottom Ad

Pages