Scriptless Social Sharing: a Plugin for WordPress

A few months ago, I was part of a conversation about social sharing buttons (or links) on websites. One concern was their general reliance on JavaScript. It seems that the scripts are especially useful for showing the number of times a post or page has been shared. But what if you don’t care about that, or you’re concerned about how many scripts your site is running? Would it be possible to add social sharing links to a website without using a lot of extra resources?

Because I’m easily distracted, I thought I’d take on the challenge. Surely it would be possible to set up the sharing buttons logically, so that they could be easily implemented on any post. I started with Paul Underwood’s excellent and really helpful post about how to create sharing links for each of the major social networks. Within a couple of days, I had a functional plugin in hand, which quietly added social sharing buttons to the end of posts.

At that point, I added the plugin to my own site, shared it with a few friends, and then pretty much ignored it. It was possible to customize the plugin–possible for developers, anyway–with judicious use of filters, one could do simple things, like add the author’s twitter handle, or more complex things, like add new social networks to the buttons. By default, the buttons were added only to posts, but it was possible (with another filter), to add them to other post types as well. It did what I needed, so I polished it a bit and then ignored it. Although I considered submitting it to the WordPress plugin repository, I chose not to–although my little plugin was very developer friendly, it wasn’t user friendly, and I was concerned that the lack of settings (for something as small as the twitter handle, for example) would be a stumbling block for the average user. And I felt that interest in this kind of plugin would be fairly limited, because the buttons are so incredibly simple.

Towards the end of February, one of my users (possibly the only one at that point other than myself) contacted me and asked me to consider submitting the plugin to the official repository, in order to take advantage of its powerful update system/process. While I agreed that I enjoyed using the plugin, and it worked quite nicely, I really didn’t consider that very many people would be interested in using it, certainly not without some kind of easier to access settings.

Over the course of another weekend, I put my head down and built a settings page, which included not only an easy way to add a twitter handle, but also allowed users to select post types on which to add sharing buttons, as well as which buttons to show. Users who want to implement their own styling can easily remove the plugin styling from the settings page as well, so it’s still pretty developer/designer friendly. Another few days, and the plugin was approved for the WordPress plugin repository.

I still thought that I was writing this plugin primarily for myself, so I was mildly astonished (and gratified) to see an immediate, and generally positive, response. Because of not using any scripts, there are some limitations to the plugin: no sharing counts, for example, and posts with no featured/associated/attached images will not output a Pinterest button (because the first rule of Pinterest is that we don’t share things without an image). But within its limitations, it works simply and efficiently. One note: although I write some plugins which work only on sites using the Genesis Framework, this isn’t one of them. It should work with any theme (it works with the default Twenty themes).

So, if you’re interested in using a social sharing plugin with very little overhead–no frills, bells, or whistles–and no scripts, I invite you to check out Scriptless Social Sharing. It’s free, and hosted on the WordPress plugin repository. Want to test it? Share this post, using one of the social sharing buttons below.

Do something awesome. Tell a friend:

subscribe by email

If you're an email kind of person, that's totally cool. Go ahead and sign up here to get the latest blog entries in your inbox! No worries, I never share your address.
  • This field is for validation purposes and should be left unchanged.

Reader Interactions

Comments

  1. March 28, 2016

    Wow, Robin, I’m impressed. I love that you did this and are sharing it (no pun intended). Thanks, I’m going to test drive it soon!

  2. March 28, 2016

    Nice! I’m definitely going to check this out. I like things which don’t use extra resources. I love your comment “because I’m easily distracted” – so you went and built something. Way to go…

  3. April 11, 2017

    Hi Robin,
    This is my favorite plugin and the best part is you give it free. I have a question and need your advise – How to make the share button open in native app rather than asking to log-in in browser on mobile.
    Let me know if this is like that, or there’s something I missed.

    Thanks Robin.
    Regards,
    Mano

    • April 18, 2017

      Mano, I did some research on this, and it looks like that’s something that has to be allowed by the apps themselves, not something that can be adjusted from this end.

  4. December 3, 2017

    Hi
    Tried plugin and it’s easy and fast.
    Question: as I test various sharing plugins ( yours included) I’m not getting a pic thumbnail with many. Is this part of the design or is something afoul on my site or yoast? (Eg. Twitter.. i don’t have a personal Facebook account so I don’t know about it but I AM using it on my blog)
    Thanks
    Howard

    • December 19, 2017

      Images are handled either automatically, if available (usually the featured image), or by a plugin, such as the Yoast SEO plugin. For Twitter, you may need to do some extra work to enable Twitter cards (probably also set up with Yoast) to get images to show there.

  5. August 1, 2018

    Hi Robin. Thanks for taking the time to create this plugin! Can you tell me if it stores any user information or if it is GDPR compliant?

    Thank you again!

    • August 3, 2018

      Julien, the only data this plugin stores, period, is the options for how to manage its output (display settings, mostly, plus optionally the site owner’s Twitter handle). It does not store any data about the site itself, and certainly not about the site’s visitors.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Bars Code Check chevron-down chevron-left chevron-right chevron-up Envelope Laptop Search Times Facebook GitHub Google Plus Instagram LinkedIn Pinterest Twitter WordPress Logo Wordpress Simple