If you would like to embed the +1 in your blog, you may use the Google +1 plugin, go to Google Webmaster Tools, or use this code inside your themes functions.php file:

/* Add plusone.js to section of your theme */
add_action (‘wp_enqueue_scripts’,’google_plusone_script’);

function google_plusone_script() {
wp_enqueue_script(‘google_plus_one’, ‘https://apis.google.com/js/plusone.js’, array(), null);

/* Add +one button after your post content by using filter */

add_filter(‘the_content’, ‘google_plus_one’);

function google_plus_one($content) {
$content = $content.’

return $content;

You can style and align button in post text by applying following class

Add this code in your theme’s style.css if you want to align it to left:

display: inline;
float: left;
margin-right: 20px;
margin-top: 4px;

And add this code in your theme’s style.css if you want to align it to right side:

display: inline;
float: right;
margin-left: 20px;
margin-top: 4px;
It’s all about +1 this week, Google’s new sharing tool. According to Google +1 is:

The +1 button is shorthand for “this is pretty cool” or “you should check this out.”

Click +1 to publicly give something your stamp of approval. Your +1’s can help friends, contacts, and others on the web find the best stuff when they search.


If you want to enable +1, click here and you will see the massive Try Now button, a simple click and you will be all set.

Eileen Lonergan
I am a WordPress website designer, blogger & partner in ElegantMarketplace.com. I started this blog to keep track of helpful snippets of code and CSS that I found while building sites 400+ posts later it has become much more. Thanks for being here and reading, I appreciate it very much.

Pin It on Pinterest