Announcing EA Share Count

Update!

We have relaunched this plugin as Shared Counts, available on WordPress.org and GitHub. Please use Shared Counts going forward as EA Share Count is no longer actively maintained. For more information, see the Shared Counts launch post.


Share count plugins are a requirement on most content-focused websites. They provide “social proof” that this article is worth reading. A social share requires less work than a comment, so you’ll see more interaction from your readers. And social networks can be a huge source of traffic.

You can use the buttons provided by the social services, but every time the button loads it’s an external call to that service which can slow down your site, especially if you’re showing a lot of buttons (ex: on an archive page).

EA Share Count

EA Share Count is a lean plugin for quickly retrieving, caching, and displaying various social sharing counts. It’s developer friendly and very extensible. Jared Atchison and I co-developed this plugin for use by our clients, who have been using it privately for months now.

It’s a great fit for high traffic websites. It will load faster than external buttons, look better, and can be used to sort your popular posts.

It’s already in use on Pinch of Yum, Chris Kresser, duPont Registry, and many other sites. See this list of Sites using EA Share Count for different examples of how it can be used.

You can use it with or without share counts.

easc-frontend

ea-share-count-admin

Features

  • Select from multiple styles of buttons, or make a custom style using your own CSS.
  • Can do WordPress queries based on share count, like a Popular Posts Widget.
  • Share counts are cached to minimize API calls. By default it refreshes the counts for posts published < 24 hours ago every 30 minutes, 1-5 days ago every 6 hours, and older than that it updates every 2 days. These increments can be modified.
  • The settings page lets you specify which share buttons to use and in what order. It also lets you display them before and/or after post content.
  • It works with all themes, but works especially well with Genesis and themes using Theme Hook Alliance, as it defaults to those hooks. You can reposition the share buttons by changing which hooks are used, or manually insert the share button code in the theme.
  • Includes a “Total Count” button. See the share buttons on this post as an example.
  • Includes “Email” and “Print” buttons. Email modal window and message is fully customizable with filters.
  • Tons of hooks and filters for customizations. See my code snippets for examples.
  • Automatic updates through GitHub.

Not in the .org repo

We’ve chosen not to host this on WordPress.org. While EA Share Count works great out of the box, it’s really designed for developers to customize. We won’t be providing support for this free plugin, and hosting it on .org would simply generate too many support requests.

It does receive updates. We’re using a Plugin Update Checker so that your plugin automatically checks GitHub for updates and lets you update from within WordPress. To a user, there will be no difference between updating this and any other .org hosted plugin.

Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk

Reader Interactions

Comments are closed. Continue the conversation with me on Twitter: @billerickson

Comments

  1. Hans Schuijff says

    Great idea Bill. Thanks for sharing.

    I’d like to have social buttons to stay in screen, like a floating bar on desktops and a sticky bar on the bottom of mobile screens, but that would probably be not that difficult to create with this plugin too. It would certainly be more efficient that Elegants theme’s Monarch plugin I’m using at the moment, or any plugin that has to probe each social network seperately on every refresh.

    I’ve read that you can select to echo or return the output of ‘ea_share()->front->display();’
    Is that because it would be more efficient to store the output of that method to a variable, in stead of calling the method several times, when showing the buttons on several positions on a page?

    The Feature to preserve non-SSL counts would be a nice addition. I have had that issue on a few websites. Then, again, when URL’s change in other ways counts are lost too, so without redirects being processed by social media there is no complete way to keep all counts when websites change.

    If one finds numbers on a website that important, one could always trick visitors by manually entering numbers, I’ve seen some plugins that allow that too. In the end, the content itself should sell the website, so I’m not that worried about it myself.

    • Bill Erickson says

      In most cases I recommend using the before, after, or before/after content display options in Settings > Share Count. This way you can easily manage it from the WordPress backend, and it will still be used if you change themes.

      If you’re not using a Genesis theme or one with Theme Hook Alliance support, it will prepend/append it to ‘the_content’ filter. You can change which hooks/filters are used with a filter: https://github.com/jaredatch/EA-Share-Count/blob/master/includes/class-front.php#L52-L103

      This is the reason you can echo or return it. For hooks you echo it, for filters you return it (ex: if you’re filtering ‘the_content’ you return $share_count . $content;).

  2. Hans Schuijff says

    Thanks, Bill, I understand what your saying. I use a genesis-based child theme, so that’s fine.

    I was thinking on the comment about the auto-updates using a separate plugin or not. I understand the reaction of Jared on that point, that is makes sure the update-function is always installed, but if many plugins would follow that reasoning it also means adding a lot of code for basically the same function.

    I see the same happening in f.i. events plugins that make the choice to add their own ticket and payment logic rather than using popular store-plugins. Using premium plugins and theme’s I now have several extra plugins running just for the update-function. Or in browsers that are reluctant to follow the same standards the same way.

    And I wonder if perhaps it would be better if someone (or rather a community) would make a good gateway that can be used to facilitate such functions for all plugins and themes that can’t or won’t use the wordpress.org repository for that function. Perhaps it will be resolved in the process of making the WordPress environment even more mature and efficient. Just a thought.

    Thanks again.

  3. Arthur Immanuel says

    Hi Bill,

    First, thank you for this great plugin.
    I just want to ask, can I use this plugin with shortcode?

  4. Ike Ten says

    Hello Bill,
    Sharing buttons to posts on archive pages .
    Is it possible to show the share buttons on post on archive pages like the blog page?
    Thanks for the plugin and when is it coming on the official repo?

  5. Ike Ten says

    I get it now. Similar to how I did it with the old one.
    Thanks you. I hope am not asking too much but Whatsapp share is my feature request. The app is slowly becoming more relevant each day for social shares.
    Best regards!

  6. Lela says

    Hi Bill! I just recently started using Genesis and your website has been a huge help to me, so a super big thank you for that. I installed your share plugin and would like to know if there is any way to add Yummly to the list of social media services?

      • Lela says

        That worked. Thanks!!!!

        One more question, in the settings, if I set my Share Count Number to ‘Total Only’, will my new service be included in that number? If not, is it possible to do so?

        • Bill Erickson says

          Yes, it should include it. The total count function loops through all the individual share counts and adds them together, so as long as you used the ea_share_count_query_api hook to add your new service to the list you should be good.

          You might also want to try the new version under development (v1.8.1). Jared added a new filter so you can modify the list of services BEFORE the built-in API queries run. This allows you to replace an existing service with a different source, like using SharedCount for all the services.

          We also added in Twitter support using New Share Counts.com

          • Lela says

            Hi Bill, Thanks again for the reply!

            Sorry I am utter pants when it comes to coding. I just copied the code from the Reddit example and replaced the variables in order to add my new service. Looking at that, it doesn’t seem to use the ea_share_count_query_api hook.

            Could you point me to an example of how to implement it?

            Side note, I updated to v1.8.1.

          • Bill Erickson says

            The Reddit code you copied simply adds a sharing button. It didn’t pull in share counts.

            I’ve never used Yummly before but it looks like their api costs $500/month to access. But they might have a free version for accessing share counts only, I just don’t know. I recommend you reach out to them and ask how to access share counts.

            At the bottom of this page you can see an example of pulling share counts from an API (SharedCount in this example)

          • Lela says

            Thanks Bill for the quick response, I will get in touch with Yummly to see what’s available and go from there. 🙂

  7. satrap says

    Thanks Bill and Jared.

    I don’t have any question. Just wanted to thank you Bill for being such an awesome person. I am not a developer or coder by any means (more of a marketer) but I like to get my hands dirty and learn whatever I can. And since I started using Genesis a while ago, I have learned so much from you and this blog.

    Just wanted to thank you for that and how generous you are with your time and knowledge. From all that I have seen and read about you, you are an extremely good coder, so I know your time is worth a lot, but it amazes me how much time you take to share what you know with the community and answer specific questions on this and other posts.

    So thank you.