Family Best Time >> Electronics

How to Add the Google+ Add to Circles Badge on Your WordPress Site

Recently, one of our users asked us how they can add the Google+ “Add to Circles” badge on their WordPress site. In the past, we have shown you how to add the Google +1 button to your WordPress posts. In this article, we will show you how to add the Google+ “Add to Circles” badge on your WordPress site.

Preview of what a Google+ badge looks like:

How to Add the Google+ Add to Circles Badge on Your WordPress Site

Before you get started, you should note that this is only for Google+ pages and not for profiles. Example of the Google+ page. Google+ profile example.

The first thing you need to do is put the following code in your section of your site which you can modify by editing the header.php your theme file.

 (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);) (); 

Don't forget to replace the plusPageID with your Google+ Page ID. Your Page ID is a 21-digit string at the end of the URL. For example, if your page URL is:https://plus.google.com/101634180904808003404 / so the numbers in bold are your page ID.

Once you've added the header code, then all you have to do is place the following code wherever you want the Add to Google+ Circles widget to display. Most users like to display this in their sidebar, so you can modify your sidebar.php file, or just add it in a text widget area.

 

For the small badge, just use this code:

 

We hope this article has helped you. If it did, then consider adding WPBeginner to your circle.