WP-Hack For Adding Google+ Page Badge ‘Add to Circles’ In Your WordPress Blog

Add this code in your theme’s header.php file’s head section:

<link href=”https://plus.google.com/PageID” rel=”publisher” /><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>

Replace PageID (in bold text of above code block) with your Google+ Page ID.

Now visit your blog’s wp-admin (Dashboard) >> Appearance >>Widgets and drag text widget to your sidebar.

Paste following code inside your text widget (replacing PageID) :

<g:plus href=”https://plus.google.com/PageID” size=”badge”></g:plus>

For smaller badge use:

<g:plus href=”https://plus.google.com/PageID” size=”smallbadge”></g:plus>

Note: You can get your Google Plus Page ID by visiting your page’s profile and copying the number before /posts or /about in URL.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.