Plugin For Sharing On Google+

This is a guest post from Alex Moss. He is Co-Founder and Technical Director at 3 Door Digital, and develops WordPress plugins. He found a way to share to Google+ from an external site, similar to the tweet button, and wanted to share it with SoS readers. The post has been updated after the launch of Alex’ plugin.

The Problem

Since Google+ launched, I have been asked a few times about whether there is some WordPress plugin or code to allow people to share a URL to Google+ from outside Google+ itself, in the same way a tweet, like or +1 button behaves. In short, there wasn’t one. I don’t understand why, because as an SEO I’d want to make sure this was available immediately or at least used the +1 button somehow to add functionality to share the +1’d URL within Google+ for all/your circles to see. There is one now however!

The Solutions

There are different ways of approaching this: using a WordPress Plugin or using a piece of code.

The Plugin

Alex has made a plugin to do this, which you can download here or in the WordPress Plugin Directory.


– Download the plugin direct from the Plugin Page at WordPress.
– Upload the whole plugin folder to your /wp-content/plugins/ folder.
– Go to the Plugins page and activate the plugin
– Insert the shortcode!

Using the shortcode

You can also use the Google +1 button as a shorrtcode. Simply enter the following shortcode within a page, post or text widget. Here’s an example:

[ google1 ]

The ‘old’ Solution: code

When Alex originally wrote this post he used the method described below, which now is outdated. We however for future development purposes (you might just get an idea out of it) decided to keep the explanation up:

At the moment there’s still nothing official available that will let you do this, however, I realised that I could use the share URL from the mobile site and manipulate it to behave how I want.

Step 1: Get a Good “share” button image

I modified the wide +1 button and changed the text to “share”. I made both the grey and blue versions of it below:

Step 2: Grab the Code

Here’s some sample code:

<a href="" onclick="'','gplusshare','width=450,height=300,left='+(screen.availWidth/2-225)+',top='+(screen.availHeight/2-150)+'');return false;"><img src="" alt="Share on Google+" width="55" height="22" /></a>

The URL linked to contains the parameter content. This parameter will automatically generate as the post when the widow opens. I have also added 2 things into the <A> tag:

  1. rel=”nofollow”
  2. The JS function to open the window as a pop in the center of the screen. To find a tidier version of the center of the screen JS, click here.

Here’s a working example of the button, sharing this article. Note that this will open a new window but will ignore the command:

Share on Google+

Optional Step 2.5: Insert into WordPress

WordPress is awesome, but you knew that already. WordPress here will be your friend by choosing all the 3 parameters automatically. I can edit the code slightly from Step 2 and I end up with this:

<a href="<?php the_title(); ?> - <?php the_permalink(); ?>" onclick="'<?php the_title(); ?> - <?php the_permalink(); ?>','gplusshare','width=450,height=300,left='+(screen.availWidth/2-225)+',top='+(screen.availHeight/2-150)+'');return false;"><img src="" width="55" height="22" alt="Share <?php the_title(); ?> on Google+" title="Share <?php the_title(); ?> on Google+"></a>

NOTE: Insert this within your theme directly, not a post or page. For some reason I have noticed that WordPress removes the command when inserted within a post/page.

The Limitations:

There are 3 limitations to this:

  1. The popup doesn’t look pretty, but that can be designed around if you want. I just white labelled it for you 😉
  2. You can’t choose individuals to share with, but you can choose all circles and the general public.
  3. The shared URL doesn’t get optimised/embedded into the post as you would when sharing a URL the traditional way.

The last point is a shame, but I guess if you really want the feature on your site it’s worth breaking one egg.

About Alex Moss

Alex Moss is the Director at FireCask, an online marketing agency in Manchester specialising in Search, Content and WordPress development. Alex is also the Co-Founder of Peadig, a WordPress framework powered by Bootstrap.

102 thoughts on “Plugin For Sharing On Google+

  1. Great idea but a potential privacy hazard as clicking the button requires the following:
    “By tapping ‘Accept’, you agree that Google will use your location in this product and accept the Mobile Terms of Service.”

  2. Thanks! Will put it on my website. Would love it though if you could somehow program the familiar balloon with # times shared, above or aside the button. More coherent with the rest of my buttons ;-).

    1. At the moment there’s no way of having a counter to illustrate the number of shares. However, it’s not impossible to create a counter for the number of times the button is clicked – not very accurate though!

  3. Requires my Google account password even though I’m logged into Google+ and Gmail in other tabs. Would like something that doesn’t require me to input my google account password because there’s no way I’d ask anyone to use this as it is.

  4. Great tip!

    I just shared your post on my Google+ account, and can already see a multitude of ways that it can be used within the online marketing space.

    Would love to hear everyone’s thoughts on how we can start better utilizing Google+ for marketing. The share button is a step in the right direction, but i don’t think everyone has Alex’s mind to manipulate the code and create alternate functionalities. has started listing tip and tricks, would love to get feedback.

  5. great, well done Alex. You are right though, the box isn’t pretty or easy to figure out, it doesn’t feel like it’s “legit” if you know what I mean. But it’s very cool and a good start.

  6. This uses the mobile version of google plus. Is there something equivalent for the desktop version? I’m trying to implement an html only (no script) version of the +1 button.

    1. Unfortunately this is the only way, and has to use the mobile site as Google+ haven’t offered a desktop version of it. Google+ have mentioned that you can share on Google+ once you +1 the URL – but I’m yet to see that for myself

  7. NICE job man :), i’m going to use it not on wordpress site but on my personnal rss reader 😀
    THX a lot !!

  8. It prompts me to accept the Mobile Terms of Service, and when I click “Accept” it simply refreshes the message. Can’t get past it.

  9. Thank you for your work on this Alex.

    Unfortunately I can not get it work. I have tried to add &hideloc=1 to the parameters as you suggested and I think I am not doing it right. Can you provide a code snippet as an example? I would love to implement on my site ASAP.

  10. Getting ‘An error occurred. Please try again.’ message. When I try to share. The error also occurs on the share button on this website. Anyone have any thoughts. I’m using a User Agent switcher set to iPhone.

  11. Getting ‘An error occurred. Please try again.’ message. When I try to share. The error also occurs on the share button on this website.

  12. You mentioned there’s a way to ‘share’ to the general public using this method. Is there a way to code it so that the public option is selected by default to anyone who clicks?

  13. Getting ‘An error occurred. Please try again.’ message. When I try to share. Plese help me out that why Am I getting this error.

  14. Google+
    is awesome, the User experiences great, and I actually love it. And the way
    they have opened it up to allow users to engage with each other more is great.
    There is no doubt that Google+ does go beyond being just a social network at
    Google. It continues to be interwoven into everything Google offers — and
    that’s what’s especially unique, Google’s ability to mine social signals
    directly linked with its own products

  15. You’re so cool! I do not suppose I’ve truly read a single thing like this before.
    So nice to discover another person with original thoughts on this subject matter.
    Seriously.. thank you for starting this up. This web site is
    something that’s needed on the internet, someone with a little originality!

  16. It’s in fact very difficult in this full of activity life to listen news on TV, thus I just use web for that purpose, and get the latest news.

  17. If the handleг passes the process, they are required
    tο сomplete a 10-week basic course with their
    asѕigned K-9. MΙX іѕ to use Poly – View, which is
    aѵailable from the Downloads linκ at You wіll require the Polyѵіew 4.
    Αs a result your ѕalеs will go ԁown and you will suffer losses.
    Precise slicing helps in revealing the clean anԁ аpt
    coding structuгes foг thе wеbsite, which plays а key role in the performаnce of the wеbѕitе on variоus poрulaг web browsers and
    search engines. А PSD file is a file saved under the PSD format аnԁ it
    іs an image file. HTML5 is the latest version in the family of maгkuρs and packs in
    a lot of adѵanced fеatuгes ωhich help you achieve dynamic websites.

  18. Hey really nice guide on sharing things on Google +. I personally like to use plugging instead of code in WordPress. But for our own website I will more preferred to use code instead of plugging.

  19. Does your blog have a contact page? I’m having problems locating it but, I’d like to shoot you an e-mail.
    I’ve got some creative ideas for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it develop over time.

  20. Wonderful beat ! I wish to apprentice while you amend your site, how could i subscribe for a
    weblog site? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast provided
    vivid clear concept

  21. It’s such a shame that Google Plus is going in the direction it is doing these days, I was certain it was about to become the fabled unified platform! Great piece Alex.

Comments are closed.