Google had officially announced their Google+, a new social network that would battle Facebook and the Google Plus button works like the popular Facebook like button. If you are thinking to add Google+ button to your post automatically in order to generate more traffic, then you can try to add the following codes to functions.php file.
add_filter('the_content', 'wpr_google_plusone');
function wpr_google_plusone($content) {
$content = $content.'<div><g:plusone size="tall" href="'.get_permalink().'"></g:plusone></div>';
return $content;
}
add_action ('wp_enqueue_scripts','wpr_google_plusone_script');
function wpr_google_plusone_script() {
wp_enqueue_script('google-plusone', 'https://apis.google.com/js/plusone.js', array(), null);
}
That’s all and thanks Spyre Studios for the great code!
/images/logo.png)
/images/featured.png)
/images/recentposts.gif)
/images/ico-rss.gif)
/images/cat.png)