 kam onn siew
Post count: 2
|
I just came across “http://www.wprecipes.com/wordpress-hook-automatically-add-a-google-button-to-your-posts?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Wprecipes+%28WpRecipes.com%3A+Daily+recipes+to+cook+with+WordPress%29&utm_content=Google+Reader”.
How and add the Google button to my site under the Tweet and Facebook buttons.
|
 themeweaver
Post count: 270
|
That’s quite easy. I’ve used the code and made it work for our themes. Just add this to the function.php in a child theme:
function livingos_google_plusone() {<br />
echo '<div class="plusone"><g:plusone size="tall" href="'.get_permalink().'"></g:plusone></div>';<br />
}<br />
add_action('livingos_share_btns','livingos_google_plusone');<br />
<br />
add_action ('wp_enqueue_scripts','livingos_google_plusone_script');<br />
function livingos_google_plusone_script() {<br />
wp_enqueue_script('google-plusone', 'https://apis.google.com/js/plusone.js', array(), null);<br />
}<br />
So easy in fact I think we may add this to the theme’s core code. Of course we made this function so that you could add any buttons you like, provided you have the code.
|
 themeweaver
Post count: 270
|
More fully explained here: http://themeloom.com/2011/12/how-to-add-extra-share-buttons/
|
 kam onn siew
Post count: 2
|
“Heroic Support” indeed !
|
 themeweaver
Post count: 270
|
|
 Roger Leitch
Post count: 23
|
Please to see this feature has been added to the theme.
Just a question about layout.
How feasible is it to have it as an option that these are arranged in a row instead of above each other?
|
 themeweaver
Post count: 270
|
Actually the latest versions of our themes have them in a row. Download and clear your browser cache.
|
 Roger Leitch
Post count: 23
|
Great – looks neater IMHO.
|