shaz.io

Google +1 with WordPress (and Jetpack Sharedaddy)

Jun 04, 2011
1 minute

[UPDATE: JetPack 1.2 released on Nov 17th 2011 has Google Plus support now] Unfortunately the WordPress ShareDaddy plugin (that comes with the Jetpack plugin) does not have Google +1 support currently, and adding it as a custom item does not work.

So, I modified one of the .php files from the ShareDaddy plugin to include this support. You will need either this plugin [1] or this one [2] installed first, in this example, I am using [1], but you can use any one if you know its shortcode.

The additions you need to make are in the sharing-service.php file. The diff is here, and this is the patched sharing-service.php file (from Jetpack ShareDaddy 1.1.2) . Below is an image and line location (lines 436-437) for the additions (click to enlarge):

This adds Google +1 to the end of the items shared by ShareDaddy. Change the shortcode to the one that your plugin comes with, I used this plugin [1] where the shortcode is ‘wgdpo_plusone’, for the other plugin [2], the shortcode is ‘google1’.

NOTE:
If you upgrade to 1.1.3, it goes without saying you will have to re-apply the patch.