Sign in to follow this  
Followers 0

Google +1 button

20 posts in this topic

Posted · Report post

Actually, I took pity on you ;) Here is google +1 in 2 lines of code! Add it to base functions.php http://www.pastie.org/2162310

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks - but how to just add it to the header? Thanks again.

Share this post


Link to post
Share on other sites

Posted · Report post

I tried adding this code and I do not see the Goggle+1 button anywhere. Do I copy/paste all of the code into just Platform Base - functions.php?

Share this post


Link to post
Share on other sites

Posted · Report post

Yes add it to platformbase/functions.php, making sure platformbase theme is active.

Share this post


Link to post
Share on other sites

Posted · Report post

Hey Alaina, Yes, you would copy/paste it to your PlatformBase's functions.php file. Is your PlatformBase theme active? BTW: There is a plugin for this in the WP repository if you just want to add it after pages/posts ;)

Share this post


Link to post
Share on other sites

Posted · Report post

Simon, it works like a charm but how can i use your code but select the small or medium plus one box?

Share this post


Link to post
Share on other sites

Posted · Report post

Chris, I have no idea ;) Assuming that js file has some kind of args you can pass to it..find a site using the small button and look at the source of the page.

Share this post


Link to post
Share on other sites

Posted · Report post

Change to ``

Share this post


Link to post
Share on other sites

Posted · Report post

Instant gratification! Good on ya, Simon... the

<g:plusone size="small">

doesn't seem to work, though. Loving this now, because my social sharing tools match now!

Share this post


Link to post
Share on other sites

Posted · Report post

A bump for this thread because I wanted to share a plug-in that floats a set of share icons in the left side of the browser that goes well with this solution posted above. It called: Twitter Facebook Social Share by Kunal Chichkar. I took out a line of code in the twitter-facebook-google-plusone-share/tf_display.php file in order to be able to apply my own style. But the default styling options are okay too.

Share this post


Link to post
Share on other sites

Posted · Report post

I'd love to add this to my page without a plugin. (I'd rather use the hook)... but alas, it doesn't work. I added your code:

	add_action( 'wp_head', create_function('','echo "";'));
	add_filter( 'pagelines_before_sharebar', create_function('', 'return "";'));
	[/code]

To my functions.php file in pagelinesbase and it doesn't work for me either. I've added plenty into functions.php before without problems. So, I'm not sure why this isn't working.

Share this post


Link to post
Share on other sites

Posted · Report post

I'm keen to hear about this too. This is my first attempt at a hook so appreciate an 'idiot-proof' explanation! My aim is to get the button to appear after each of my post's tags area. If I can get that working I'll remove the buddypress footer from the full post view, adding discreet buttons alongside the google+. www.mattrichardsillustration.com/blog

Share this post


Link to post
Share on other sites

Posted · Report post

The code integration in functions-php for the share section works well enough. But you should be able to link to your google-profile in the header in the same way as you can link to your facebook or twitter profile.

Share this post


Link to post
Share on other sites

Posted · Report post

@pross Could we use "pagelines_before_branding_icons" to get this in the header? Any chance we can add this to the social media integration in Pagelines? I am more than willing to update the platform pro graphics and sprites. This looks like it is growing fast and I think more and more people are going to want to add it. Your help as always is appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0