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.
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.
Nick Davis says
Thanks Bill and Jared, this looks pretty handy.
Much appreciated.
Joshua Nelson says
Guys, this is awesome. And the ability to use it for a popular posts widget is genius. Appreciate you sharing this project with the world!
Any specific reasoning behind using the drop-in Plugin Update Checker over providing support for a third-party plugin like Github Updater?
Cheers,
Joshua
Jared says
Originally we sided with the drop in updater, because it allowed us to serve updates in a very manual and controlled environment. Also with the repo being private it made sense.
The issue I have with the GH updater is I’m not a fan of installing another plugin on my site to get updates for a plugin. I think Bill is in agreement as well.
I understand the concept, but I think what ends up happening is you get a lot of installs that don’t actually install the GH updater plugin, therefore don’t get access to updates. Packaging it as a whole more closely mimics the .org process (but without the support and hassle :)).
Joshua Nelson says
Jared,
Totally makes sense, and I figured that was the logic path for that decision. I like the GH Updater, but I’ve moved away from it for similar reasons. However, I’ve kept in the two lines needed to support it, for those you choose to use it.
I haven’t used the updater you’ve placed in this plugin, but I’m watching the repo now 😉
Thanks again – great stuff!
Joshua
Michael Bastos says
Keep in mind that SharedCount can’t do Twitter anymore, but the regular Twitter button no longer gives you counts anyhow so I guess it really wouldn’t matter
http://www.sharedcount.com/notes/twitter_api_shutdown.php
I face a similar issue with the work I do at LocalStack.com as we calculate share numbers across the board as well.
Bill Erickson says
Correct, the Twitter share button will always show a zero count due to Twitter shutting down the API. That doesn’t mean clients want to drop the twitter button altogether, which is why we left it in. That’s also why we added the “Hide if zero count” option, and the “Total” option.
At the top and bottom of this post you’ll see my share count buttons, which is the approach I tend to use on client sites. Show a total count across all services (excluding Twitter of course), then offer a bunch of options for people to share.
Artur says
Hi, Bill.
Just wanted to mention alternative Twitter share counting services like newsharecounts.com or opensharecount.com. These could be an optional solution for those who really want to get tweets counted.
Best wishes!
Bill Erickson says
Thanks for this. We have a ticket open regarding twitter counts but haven’t researched the best option yet.
Prakash says
Thanks for the share Bill , testing the plugin on the test site seems to be very light weight. Really Awesome Share 🙂
Rob says
Bill, thank you for this. Basic question (sorry): how can I display an instance of the buttons via PHP without using before/after_content in the settings?
Bill Erickson says
If you want to display the buttons in the order specified in the settings page (so you can use the settings page to still manage your buttons), use this:
ea_share()->front->display();
It also accepts two parameters:
– Location (default is empty): This is just added as a CSS class to the wrapping div
– Echo (default is true): Whether to echo or return the output.
Alternatively, you can display specific buttons. For instance, let’s say you wanted to show the facebook like button. Use this:
ea_share()->front->link( 'facebook_like' );
See all the available parameters here.
Rob says
Thank you!
Ben Pines says
This is just what everyone needed! I actually wrote that all Facebook plugins are super slow in my latest blog post, How did you think of this idea? Thanks!
Bill Erickson says
I originally built it for Western Journalism since they needed a better performing share tool, and then I started using it on other client projects. Each client paid to have one or two features built based on their specific needs, and after about 5 projects the plugin was pretty feature complete.
Leho Kraav @lkraav says
Is there a way to move a site from http -> https, and not lose your sharecounts? Even if I filter the query to do http, it looks like all new shares would register for https. I can’t imagine one would have to start manually adding up both protocol counts. Any thoughts?
Bill Erickson says
That’s actually a feature we plan to add, which only one other plugin currently does (to our knowledge). See this ticket for more information: Feature to preserve non-SSL counts
Leho Kraav+@lkraav says
+1000, I subscribed to the GH issue
James says
Hi Bill, Thanks for the great plugin! I love how light weight it is. Is it possible to disable it on specific pages if using it on pages? Thanks for your time and efforts!
Bill Erickson says
The simplest option would be something like this:
if( is_page( 'about' ) )
add_filter( 'ea_share_count_theme_locations', '__return_empty_array' );
Tilak Bisht says
Hi Bill, first of thanks for plugin.
When I use this plugin, it shows 10 FB shares but previously I were using Genesis share, it shows 358 FB shares…how this kind of difference is showing?
Bill Erickson says
Are you sure you’re checking the same URL? Maybe Genesis Simple Share was using your site url and not a specific post’s url.
You can see the share count for any URL by visiting SharedCount.com and typing in the URL.
Nicole says
Hi Bill,
Thanks so much for this plugin. Works like a charm.
I noticed you included the code for how to get the Box style like you have here on your site, but I didn’t see instructions for how to implement it. I know where the CSS goes, but where do we implement the global.js and the sharing.php?
Thank you!
Bill Erickson says
They go in your theme as well. Add a global.js file to your theme (or add that code to an existing Javascript file you have). I usually put them in a
/js
folder in the theme.Place the sharing.php file wherever you’d like in your theme. I usually put them in
/inc
.then include both of those files in your theme’s functions.php file. Like this: https://gist.github.com/billerickson/7424fc8115d381aa6004b46d658b6e52