Learn WordPress
Home » Programming, Script

Add Google +1 in WordPress

After the launch of Google + and how people are confusion to register and get confused invitation to have a google account +, now bloggers are confuse to adding Google + button into their blogs. Google has announced much waited of +1 button.

Add Google +1 in WordPress

What is the Google +1 Button?
Yea i know this is a huge steps adding the social aspects to the search results. So you guys, let’s discuss anything needed to know Google +1 button including the step by step guide to adding in your WordPress blog or site.

It is similar concept as Facebook Like button for search results. But in Google +’s it’s your mates way to say “this is damn pretty cool” or “you should check this damn cool out”. Another webmaster words it’s a public way to stamp something with yourown approval, so your guys and peoples on the web get the best results when they search.


After the launch Google +, there are a bunch of webmaster specially in WordPress developer trying to create some Google + plugin, but absolutely you’re not need any Google + plugin, coz’ you can manually adding the script.

Add Google +1 Button


So Google has anticipated this by preparing and created an Google + official page for publishers contains numerous sizes and some customizations that may needed.

Now go to your theme footer.php file and paste the following code before closing of your body tag </body> :

<script type=”text/javascript” src=”http://apis.google.com/js/plusone.js”></script>

or paste the following code in your functions.php file or custom functions area:

function add_googleplusone() {
echo ‘<script type=”text/javascript” src=”http://apis.google.com/js/plusone.js”></script>’;
add_action(‘wp_footer’, ‘add_googleplusone’);

and then open your theme file where you want to add and showing the Google +1 Button. Most of bloggers show it in single.php file. But there are numerous size options you can use;

Add Google +1 in WordPress

//Code to paste for the Small Button
<g:plusone size=”small” href=”<?php the_permalink(); ?>”></g:plusone>

//Code to paste for the Medium Button
<g:plusone size=”medium” href=”<?php the_permalink(); ?>”></g:plusone>

//Code to paste for the Standard button
<g:plusone href=”<?php the_permalink(); ?>”></g:plusone>

//Code to paste for the Tall Button
<g:plusone size=”tall” href=”<?php the_permalink(); ?>”></g:plusone>

FREE Cloud Storage