Google +1 button for WordPress plugin Sharedaddy

TL;DR The best WordPress plugin for adding share buttons right now is Sharedaddy and you can download this fork to have a Google +1 button.

Best sharing buttons for WordPress

The Sharedaddy plugin may very well become the standard for adding share/like buttons to self-hosted WordPress blogs.  It’s authored by Automattic, the creators of WordPress, and offers the same functionality as what you’ll get on the blog host wordpress.com. It comes bundled with the indispensable Jetpack plugin. Its strong points are a drag-and-drop interface, a focus on only the most popular sharing services (other than Twitter and Facebook, who the hell actually uses all the share buttons you see on the web?), and importantly, click-tracking integration with WordPress.com Stats, which is another module of Jetpack.

I want Google to be my +1

The only short-term problem is that it currently doesn’t support the recent Google +1 button.  Marco Newmann extended Sharedaddy to add it, so there’s no need to wait for the inevitable Sharedaddy update.

But Marco’s plugin doesn’t work quite right.  So I modified his modifications to make the button work consistently with all the other services:

Sharedaddy with Google +1 button

  • I reverted to the “smart button” terminology instead of talking about “count”.
  • All 3 major display styles (smart button, non-smart with text, non-smart without text) are supported, as much as feasible.
  • The smart button is always medium-sized, and the non-smart button is always small-sized.
  • In all display styles, the buttons and text are cropped and aligned properly, both within the WP Admin and on the rendered web page.

Get the goods

Download my fork of a fork of Sharedaddy 0.2.12 at https://github.com/huyz/wp-sharedaddy.

Related posts:

  1. The Easiest Way to Embed a Java Applet in WordPress This new plugin java-applet-embed is the easiest way to embed a Java applet in a WordPress site....
  2. Footnotes anywhere in the content of a WordPress post or page Embed footnotes in a WordPress site anywhere in the content with this modified wp-footnotes plugin....
This entry was posted in Feature, WordPress plugin and tagged , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • http://www.falgram.com Falmung

    It sorta worked. But the icon doesn’t appear on the admin page and appears with a space in the actual posts. Take a look http://www.falgram.com/blog/?p=18

  • http://huyz.us/ huyz

    The Google +1 icon doesn’t show up in the admin page, in the Live Preview section?

    As for the space after the Facebook button (or after the Google +1 button), there’s not much that can be done about that. Both Facebook and Google reserve some space because the space may or may not contain things of varying lengths. For example, the FB Like button has space after it right now because it has a fixed width of 96px; but once someone votes, it would have “< 1 ]" and maybe some day, if you're lucky, "< 999999 ]" within that space. The same thing goes with Google. This is the fault of Google and Facebook: they don't adapt the width automatically according to what needs to be displayed. It's ugly, I know.

    I don't know what can be done about it.

  • http://huyz.us/ huyz

    A couple of things about your site:

    I noticed that vertical alignment was not right for you.
    So I updated the sources in github again. You can download the latest there. Hopefully, the Google +1 button should align properly this time.

    As for your digg button, it’s shifted down because for some reason it’s not a smart button but it’s styled with … , which is for smart buttons. Did you change anything by any chance?

  • mcclanahoochie

    Thank you!

  • http://www.mioudesign.com/blog/2011/07/04/googleplus1_sharedaddy/ Ajouter Google +1 à Sharedaddy | Miou Design

    [...] modifiée. Télécharger Shareddady avec le bouton « Google+ » Lire l’article de huy’z à propos de cette version 0 [...]

  • http://gotsmith.com Sydney

    I’m using it, seems to work great. Thanks!

  • http://twitter.com/andreyburan Andrey Buran

    Hi! Thanks for the nice pathc for the Sharedaddy.
    It seems working and I can see it at the Sharing admin page, but it looks like white spaces in the actual post page. You can check here for example: http://basslogic.net/2011/06/23/new-mayhem-collab-tunes-2/
    I would be very grateful if you have any ideas.

  • http://huyz.us/ huyz

    Strange. I have no ideas right now. I wish I had more time to look at it. Maybe in a few days…

  • Moi

    That’s a really great work, thank you very much!!

  • http://twitter.com/purelinkbuildin PureLinkBuilding.com

    Works great for me, thanks for sharing (just wish WP would hurry up and sort this out)

  • http://www.identitales.com Esther van der Wal

    Hi there, thanks for putting this out there. It seems to work, however it also adds the share buttons to my teasers. I’d rather only have them below my full posts. Do you happen to have a solution for this as well?

  • Benoît

    Hi,
    Great job ! I hope official Jetpack’s next update will embed this new button.

    I have a little problem with translation. I’m a french user. French translation seems incomplete on display… but fr_FR.po is entierely translate… I don’t understand why all the translation does not appear in my admin. It is not important but i’d like to understand :)

    Thanks

  • Thom

    Hi, awesome plugin! How do I use it alongside Jetpack, though? I cannot seem to have both active at the same time?

    Also, how can I control what a Facebook like will do? The appropriate post is made on Facebook, but the thumbnail is another random unrelated image from my site. Thanks.

  • Usmankm9

    hello

  • Krzysztof Machocki

    Sadly: “Fatal error: Cannot redeclare sharing_email_send_post() in /home/halibutt/public_html/wp-content/plugins/huyz-wp-sharedaddy-f058a17/sharedaddy.php on line 13″

  • http://www.popservations.com Johnathan Pop

    Help! I was just copying all the new files over, and now I can’t access my WP self-hosted site or the dashboard — I get this:

    Warning: require_once(sharing-sources-custom.php) [function.require-once]: failed to open stream: No such file or directory in /home1/popserva/public_html/wp-content/plugins/sharedaddy/sharing-sources.php on line 1006

    Fatal error: require_once() [function.require]: Failed opening required ‘sharing-sources-custom.php’ (include_path=’.:/usr/lib64/php:/usr/lib/php:/usr/share/pear’) in /home1/popserva/public_html/wp-content/plugins/sharedaddy/sharing-sources.php on line 1006

  • http://huyz.us/ huyz

    Maybe Sharedaddy changed then. I’m sorry I have no time to update my patch because I’m too busy with Google+.

  • http://huyz.us/ huyz

    Maybe Sharedaddy changed then. I’m sorry I have no time to update my patch because I’m too busy with Google+.

  • http://www.popservations.com Johnathan Pop

    Maybe — at least I had a backup.

  • http://profiles.google.com/jim.whati Jim Stauffer

    worked for me – after I uploaded it and renamed it, your modification made a +1 button avaliable in my sharedaddy configuration. I added it and it shows up on my bluehost-ed WP blog wayupnorth.ca/blog

  • Kelechi Amadi

    Thanks very much for this. Worked for me just fine.

  • http://twitter.com/pjpbarnes Phil Barnes

    hey, great job with this, just installed it and it works perfect. There are so many bad attempts out there, this is like my fifth try! I can’t talk though, I can’t write them. Kudos to you.

    Thanks!

  • http://net-follower.myopenid.com/ dotNetFollower

    Hello!
    Nice post!
    In my blog I described how to add Google +1 Button to every WordPress blog post in respect to iNove theme. I added the +1 button manually editing php files. Probably, it could be useful for someone. The article is here – WordPress: How to add Google +1 Button to WordPress blog post.
    Thanks!

  • SPQC

    Can you made it so the Google+1 text is also a link just like the button?

  • Gangadhar Reddy

    Huy’z, thanks for fixing google plus issue. Btwn I don’t see the like button option in settings page to enable it. Wat can be the fix to it? Any help wud be highly appreciated. Thanks