Jump to content
Sign in to follow this  
kevinpilot

Google +1 Missing in 2.0

Recommended Posts

kevinpilot

I was surprised that Google's +1 button is not an option on the article sharing bar in version 2.0. Is there any chance anyone can send a code update so that I can add google's +1 button to the article sharing bar? I don't mind adding it my self. Just show me the code and which file to add it to. Regards

Share this post


Link to post
Share on other sites
Martin Bay
YYes weird they left it out! To add Google+1 on top of page: [code] add_action( 'wp_head', create_function('','echo "";')); add_action( 'pagelines_branding_icons_start', create_function('', 'echo "";'));[/code] To add Google+1 in share bar: [code] add_action( 'wp_head', create_function('','echo "";')); add_filter( 'pagelines_after_sharebar', create_function('', 'return "";'));[/code] Style with this: [code].gp1 {}[/code] in style.css

Share this post


Link to post
Share on other sites
Martin Bay
Ah yes the code should be in the [i]functions.php[/i] Good luck

Share this post


Link to post
Share on other sites
kevinpilot
Martin - For the share bar, wouldn't I need to add the code to the sharebar/section.php file? I tried, and it didn't work for me.

Share this post


Link to post
Share on other sites
kevinpilot
Disregard. It worked when I added it to function.php. Thanks again!

Share this post


Link to post
Share on other sites
thomed
I can suggest a little extra CSS to tidy up the +1 box layout/positioning... Edits to martinbay's code above for the child theme functions.php file (only change is to amend the class names so that they can have distinct styling... [code]add_action( 'wp_head', create_function('','echo "";')); add_action( 'pagelines_branding_icons_start', create_function('', 'echo "";'));[/code] [code]add_action( 'wp_head', create_function('','echo "";')); add_filter( 'pagelines_after_sharebar', create_function('', 'return "";'));[/code] CSS that goes in child theme .css [code].gp-head { margin-right: -30px; } .gp-sharebar { margin-left: 5px; margin-right: -40px; } [/code]

Share this post


Link to post
Share on other sites
Martin Bay
@thomed always great with some extra refinement :)

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  

×