HomeForumsPure Theme Discussion & SupportAdd Google button under Tweet, Facebook buttons below content

This topic is: not a support question

This topic has 3 voices, contains 7 replies, and was last updated by  Roger Leitch 153 days ago.

Viewing 8 posts - 1 through 8 (of 8 total)
Author Posts
Author Posts
December 9, 2011 at 12:44 am #2288

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.

December 9, 2011 at 3:10 pm #2298

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 '&lt;div class="plusone"&gt;&lt;g:plusone size="tall" href="'.get_permalink().'"&gt;&lt;/g:plusone&gt;&lt;/div&gt;';<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.

December 9, 2011 at 4:22 pm #2325

themeweaver
Post count: 270

More fully explained here: http://themeloom.com/2011/12/how-to-add-extra-share-buttons/

December 10, 2011 at 5:48 am #2343

kam onn siew
Post count: 2

“Heroic Support” indeed !

December 10, 2011 at 9:40 am #2344

themeweaver
Post count: 270

:-)

December 12, 2011 at 1:07 pm #2358

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?

December 12, 2011 at 10:26 pm #2359

themeweaver
Post count: 270

Actually the latest versions of our themes have them in a row. Download and clear your browser cache.

December 13, 2011 at 1:56 pm #2382

Roger Leitch
Post count: 23

Great – looks neater IMHO.

:)

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.