Most Share Posts
The Most Shared Posts plugin for WordPress allows you to display, as a widget, which of your blog posts have the most social shares and are proving to be your most popular content.
Version 1.1.0 – 14th August 2011
hosted on wordpress.org
If you’d like to see this plugin in action, you can see it on this site, or you could check out Kate Morris’ SEO Blog or John Doherty’s SEO Blog. They both helped to test the initial version.
Features
If you have feature requests, bug reports or you just want to show me where you are using the plugin please post a comment below or drop me an email to [email protected].
- Fetches Facebook Likes, Twitter Tweets and the new Google +1s.
- Caches results to ensure good performance. Older posts are cached for longer.
- Select which of the 3 social counts to include.
- Select how many posts to display in the list, and an age cut-off.
- For beginners, it is very easy to install with no necessary customisation.
- For advanced users, there are various display options available.
- Option to hide the counts and icons.
- You can have multiple instances on the same page with different titles (e.g “Most Tweeted Posts” showing just the Tweet counts, or “Most Liked Posts” showing just the FB Likes counts etc.)
Installation
The steps to install ‘Most Shared Posts’ are quite simple:
- Upload `most-shared-posts` directory to the `/wp-content/plugins/` directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to the ‘Widgets’ page in the ‘Appearance’ section of WordPress.
- Now you can add the widget to different pages of your site. Recommended pages to add the widget: “Sidebar Index”, “Sidebar Single”, “Sidebar Category”.
- You can customise the plugin differently for each of these sections should you wish.
- NOTE: The plugin throttles how quickly it gathers the social data, to ensure it does not cause any slowness for your users. For small sites with less than 100 posts, this should typically be done in the first hour. For sites with other 2000 posts it could take a day or more.
- Now load a page on your blog which should show the widget. This will initiate the first data fetch.
Frequently Asked Questions
- Q: I just installed and refreshed the page, but my most shared posts are not at the top of the list?
A: The plugin will take a little time to collect all the data about your posts. It does so in batches so as not to upset the social networks by requesting too much data at once. You should find that it’ll sort itself out and catch up quite quickly. - Q: I just got tweeted but the count hasn’t updated! Why not?
A: The results for each post are cached for varying lengths of time depending on the posts age. Very recent posts (less than 2 days old) are cached for an hour, and then older posts are cached for incrementally longer periods of time. Posts in the last month are cached for 12 hours, posts 1-6 months old are cached for 48 hours and older posts are cached for a week. - Q: My older posts aren’t showing up…
A: When you add an instance of the widget to a sidebar in the WordPress admin section, you can customise how far back you wish to look; the default is 2 years. - Q: Where can I change how many posts are included in the list?
A: When you add an instance of the widget to a sidebar in the WordPress admin section, you can customise how many posts to include; the default is 5. - Q: I activated the plugin, but I don’t see it. 🙁
A: This plugin is a widget, so after activating it you need to go to the Appearance->Widgets section of your WordPress settings and select which pages you’d like it to appear on. - Q: Can I include the count inside a post or a page?
A: Yes – there is now a shortcode option. The shortcode has a few options (all are optional):[most-shared-posts num_posts="5" max_month_age="24" title="Most Shared Posts"]
- Q: I have no shares. How depressing… help!
A: Assuming you’re providing content worthy of being shared… Make sure you are including sharing buttons on your blog in a consistent fashion. I recommend adding them into your theme, or alternatively:- Alex Moss of Pleer has created some great social button plugins for Twitter, Facebook and Google+.
- The AddThis plugin is very popular, and provides a variety of sharing buttons.
- At sharethis.com, they provide a variety of sharing plugins.
- The Sharedaddy plugin, part of Jetpack from WordPress.com, provides a range of social buttons.
Changelog
Version 1.0.0 – 4th August 2011
- Initial Release
Version 1.0.1 – 5th August 2011
- Update on the format of the API requests for added robustness.
- Added link to the FAQ on plugin activation.
Version 1.1.0 – 14th August 2011
- Can now view social stats in admin area (with or without an active widget).
- Added a shortcode option to include within posts/pages.
- Data now collected without an active widget.
- Improved method for scheduling data collection.
- Various code tidying and improvements.
Donate
Please consider a donation, or alternatively enabling the attribution link in the settings:
Consider urlencode()-ing the get_permalink() in the Facebook and Twitter file_get_contents() requests. Stay safe.
Good shout. I think if someone is already compromising your permalink_structure then you have bigger problems, but you are right. Just rolled that in now. Thanks. 🙂
Cool plugin, similar to what Huffpo and a few others have been doing for awhile to promote content. Also think that showing users that your posts get shared is a good measure of quality. Nothing like landing on a random blog, trying to figure out if it’s legit or not, and seeing all 0’s next to social sharing.
Thanks, Keith! 🙂
Yeah – I agree that social sharing is a key indicator of what people are enjoying, so it not only helps draw attention to the most popular content, but also builds trust AND helps the author see what is being well received and what isn’t.
Thank you for making this available! I have been wanting this functionality for quite some time. Much appreciated!
Thanks Patrick!! Looks really nice on your blog! 🙂
Let me know if you have any feedback or feature suggestions. Got a few already so going to be doing some updates in the not too distant future.
I dunno how to thank you man, if thank you will do i’d be happy..this is exactly what i’ve been looking for ages, if u’d like any Arabic translation support i’d be glad to do it, thanks again Tom, u’re the best
Hi Ahmed — Thanks a lot. I’m glad you like it! 🙂 If the plugin proves popular I will want to provide some translations so that is a great offer, thanks. 🙂
Great plugin. Works with the Sharedaddy plugin (part of Jetpack) by WordPress.com, too.
Thanks – I’ll add that to the FAQ. Glad you like the plugin. 🙂
Hi.. This is a nice plugin to have, but wanted to know how we can manually call the function, instead of a widget..
Hi Avinash. Thanks! Yes, a shortcode is on my to do list for the next version, which should be coming in the not too distant future. 🙂
Thanks , I ‘ll be waiting for it.
Also eagerly waiting for a short code or template tag version of the plugin. Looks excellent and can’t wait to try it.
Avinash & Jean-Paul,
Just updated the plugin now and introduced a shortcode you can use. Let me know how you get on with it!
Thanks for the update, I’ve set it up in my blog.
I really like your idea(!), but I need an template tag because I do not use a widget sidebar (i dont like it). I also want to write about it. Something like
Your can try this to display the most shared posts, without using the widgets.Place the code in the sidebar.php where you want to display the list .
For some reason it’s only polling the Google +1 shared entries, and twitter & fb shares are all at 0 – though I know it’s been shared.
Hi there,
I’m looking into why this might be – not sure why that might be. Can you send a couple of example URLs?
I’m wondering about the plugin throttle speed. It seems that it would compile social data slowly to not affect page views. But this is all I’ve read about it:
“The plugin throttles how quickly it gathers the social data, to ensure it does not cause any slowness for your users. For small sites with less than 100 posts, this should typically be done in the first hour. For sites with other 2000 posts it could take a day or more”
Hi Mick,
One of the FAQs deals with this:
“The results for each post are cached for varying lengths of time depending on the posts age. Very recent posts (less than 2 days old) are cached for an hour, and then older posts are cached for incrementally longer periods of time. Posts in the last month are cached for 12 hours, posts 1-6 months old are cached for 48 hours and older posts are cached for a week.”
Furthermore, it’ll never do more than 15 API calls at once (so with 3 networks it’d be updating 5 posts), and it’ll never do more than one batch every 15 minutes. Should an API call fail, then it’ll wait 6 hours before trying again.
-Tom
Hey Tom,
Great plugin, been looking for something like it for awhile and only been able to show users most viewed and most recent posts, now I can add most shared to the list! I’m actually having a few problems though. I’ve tweeted about a recent post a while ago and everything still shows as zero. Also in the dashboard the Images links for the social services are dead. Don’t know if these are related but most importantly its not actually getting the social data! Please help!
Thanks for your emails about this, Kevin. I think I have fixes for both which should be in the next release. 🙂
It doesn’t seem like this plugin accounts for shares pages, just posts. Is that correct? If so, is there an easy way I can adjust to include pages?
Thanks so much for your help!
Hi Dan. Yes, currently it is just posts and not pages. However, the next release will have an option to select (for a particular widget), either pages, posts or both. 🙂
hey, it is a great plugin, thank you, but one thing i noticed is after i activated it, all the “facebook likes” i have on the old posts are gone, like some of the mosts got 1000 likes, when i check the post again now it is back to 0. do you know why?
Can you fire me a URL for this. Did you update the permalinks structure of your site?
Nice plugin. I have it up and running at frontsidebus.net but I have one question. When pulling the widget using shortcode, how do you change the max age to one day? Thanks
You can’t in the current version (1.1.0) – but you should have more options in 1.2.0 expected soon. 🙂
That’s disappointing but understandable. I’ll be looking forward to the update.
Thanks for getting back to me about my first question. I have another question/issue. On my site the widget only appears when using Firefox. It does not appear in Safari, Chrome, or IE. Any ideas?
Do you have a URL where the widget should I could look at so I can test this? Sounds very odd!
Theres something wrong with the latest plugin, it doesnt count all my popular posts and the counter seems to be stuck at 120 facebook likes. i have over 50 posts with over 2000 likes and the plugin havent found any one them 🙂
Thanks for your reply to my email. I’m looking into this! 🙂
Hi,
you wrote in your changelog: “Added a shortcode option to include within posts/pages.”
Where can I find the shortcode to add manually the buttons?
Greetings
Frank
Hi Frank,
There is a section in the FAQ above. The code should look:
I’m going to add some more options in the next update. 🙂
Hi, there!
I’ve installed the plugin last night, and so far, nothing appeared at the share counts. I have 226 posts published, ill it take longer to show the counts, or it might have something wrong?
Thank’s for your attention!
Hi again…now I’m having some issues with FB and TT API’s: “PHP Warning: file_get_contents(http://api.facebook.com/restserver.php?method=links.getStats&format=json&urls=http%3A%2F%2Feulalios.net%2Feueeu%2Findex.php%2F2010%2F06%2F24%2Farthur-o-conquistador%2F) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in E:\home\eulalios5\Web\EueEu\wp-content\plugins\most-shared-posts\msp-fetch.php on line 121
PHP Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in E:\home\eulalios5\Web\EueEu\wp-content\plugins\most-shared-posts\msp-fetch.php on line 179″
Hi Cynthia,
It seems that your hosting setup disallows the function I am using to access the social APIs. However, in the next release I change the way I do this, and I think it may solve your problem. I’m working hard on the update and will release it soon. I’ll fire you an email when it is ready and you will hopefully find it helps!
Ok, thank’s a lot! Looking forward to have it working at my blog!
Hi, I was wondering if I could do this plugin for a list of (children) pages, shown on a page instead of posts on a sidebar?
I have the same doubt James!
If you discover, can you tell me? 🙂
Thanks ;*
i was looking for this plugin!!
Thanks!
i just downloaded it and checked on my “Most Shared Posts” statistics..
but they counts are not correct…
is it that i need some time for it to get the correct statistics?
it has been 30mins since i activated it..
thank you.
it has been one day but the figures are not correct, yes those with “like” are summed correctly but those post without “like” also turns out to be “1”..
very good post, i was really searching for this topic as i wanted this topic to understand completely and it is also very rare in internet that is why it was very difficult to understand
thank you for sharing this.
Regard
Stock Market
Great plugin. I have been looking for something like this for a couple of weeks. Hope it works well with my site. I have a couple of ideas I want to try.
Thanks!
Hello,
this plugin works very well, congrats!
But I’m looking for a way to display the most shared posts in a box with 2 tabs (one for the most read posts, the other for the most shared posts). Is it possible ?
Any help is welcome 🙂
Hey Tom, I’m having a problem here.
I have this site http://www.feedbusiness.com.br/ it’s offline to the public yet, but I installed the plugin and I’ve set the widget to show the “Most Shared Post” at index.
Every day I share more than 3 posts, but I take care to share, at least, one of the most shared.
The problem is: the admin page shows ZERO votes to all the posts. What I’m doing wrong?
I use the addthis and sharethis plugin’s to wordpress. ShareThis is installed, and addThis is the code of site.
Can be a conflit problem? Or need a minimum number of shared posts?
tks, anyway.
Very good post, i was really searching for this topic as i wanted this topic to understand completely and it is also very rare in internet that is why it was very difficult to understand.
Thank you for sharing this information.
Regard
Gold Silver Tips
I installed the plugin but nothing icon shows in my post. sir do you know where or what would be wrong?
I read your post that’s really useful information about the market.I really appreciate your post and you explain each and every point very well.Thanks for sharing this information.
Regards
Gold Silver Tips
Excellent and informative tips.I like your post and it really gives an outstanding idea that is very helpful for all the people on web.
Intraday Tips
Excellent plugin
Could you tell me if exist a shortcode to include share results without widget ? for example : in my sidebar ? i don’t tell about [most-shared-posts num_posts=”5″ max_month_age=”24″ title=”Most Shared ] in a post
Thks in advance
Hi Tom, I activated the plugin and display it on the widget area but it only displays title of the widget. I have social share icons installed, but the plugin didn’t display the most share articles.
Good news.This is a great post. I like this topic.This site has lots of advantage. I found many interesting things from this site. It helps me many away..So i want some information for sharing this side with some of my friend. Thanks
Hi Tom, I just install your plugin Version 1.1.0 in my WordPress 3.2.1.
My website have about 600 posts and i already install this plugin for about 36 hours.
when i click ‘Your Most Shared Posts’, it still show no post in this page.
May i know why??
Excellent and informative tips.I like your post and it really gives an outstanding idea that is very helpful for all the people on web.
mcx tips
I really appreciate your post and you explain each and every point very well.Thanks for sharing this information.And I’ll love to read your next post too.
Regards
Mcx Tips
This post is really nice and informative. The explanation given is really comprehensive and informative. I am feeling happy to comment on this post. I think this is useful information for users-How does the ordinary investor fit into the equation comprising of global factors coupled with manipulation in the stock markets.
indian stock market tips
Hey Tom,
i need a little help here. I am using taxonomies, and i cannot make it work.
I installed it, added ‘post_type’ => ‘any’ in msp-fetch.php, so it looks like:
And after few days, there is no posts fetched.
Have i missed something?
Thanks
Dusan
Tell me how to get the plugin without the widget in the sidebar with the output of the function?
Is there any way to pull the image from the post to be displayed next to the article/post title? Cheers 🙂
Hi! Thanks a lot for the great plugin. I see you have linkedin in your version of most shared posts. Is it possible to have that in the wordpress plugin?
Cheers
Dude, rockin’ plugin! I’m with jnreyt, how do I go about adding another service, like Digg or Stumbleupon?
Hi Tom,
I think you have made a wonderful plugin. 🙂
However, I have some issues with Google Webmasters Tools which I have traced and seen that it was caused by your plugin. A line from Google Webmasters Tools:
http://www.yournextshoes.com/2011/07/clemence-poesy-nina-ricci-black-platform-wedges/function.file-get-contents
Clicking on that file shows 404 error.
When I checked my web hosts’ error_log I saw the errors which came from your plugin.
Line 1807: [13-Nov-2011 17:52:08] PHP Warning: file_get_contents(http://api.facebook.com/restserver.php?method=links.getStats&format=json&urls=http%3A%2F%2Fwww.yournextshoes.com%2F2011%2F11%2Fshop-neiman-marcus-call-sale-40%2F) [function.file-get-contents]: failed to open stream: Connection timed out in /home/ynextsho/public_html/wp-content/plugins/most-shared-posts/msp-fetch.php on line 121
I have read through the installation instrucitons, FAQ, and the comments here. I hope the error was not caused by anything I’ve missed during setup.
The errors aren’t visible for the visitor. All the errors are seen on the backend.
In case you are interested where I’ve placed your plugin, it only shows on pages for now.
http://www.yournextshoes.com/about/
I hope you could look into this issue?
Thank you and good day.
Well worth to read this article, thanks for sharing this information. With this article you offered me got a chance to know about this, anyway i say Great Article! I’m waiting for you next article about this interesting subject.
Very interesting and insightful. Thanks for sharing it with us.
Terrific plugin – I can’t wait to get it working. My main problem is that I’m running the Webcomic plugin, which uses a custom post type. Any chance you’re likely to support custom post types any time soon?
Hi, a great plugin! But how long can it take to display the shares? I have installed 3 days ago – all that’s shown until now are 3 posts with a few google +1 shares – no facebook and no twitter yet. Is it possible that it’s still working? Or is something maybe going wrong?
Great plugin, but same problem here: the google+ counter works, but no counts (not even a zero) for the other ones. Could it be that a caching plugin of some sort is interfering?
By the way, adding counts for linkedin would make this plugin even more complete 🙂
does not work, i put the plugin into plugins folder, activated the plugin, and put the plugin into sidebar but many days spent it is not picking shared posts, which are shared into facebook and twitter.
There is also one question regarding the plugin; on Facebook if I share a post with specific list of people (not public), would it be considered a share (means would it be listed into shared posts) or post will be considered shared if and only if it is public?
working like a charm, private or public considered a share :); thanks for this wonderful plugin. Do you have plans for including other social media like Linkedin?
not so bad…
great pleaser
Great plugin – I’ve been looking all over for something like this. I do have a suggestion though.
Feature request: The option to display the post feature image beside the post title.
Hello Tom, I recently installed this plugin on my website. It works fine initially, but as I’m writing this comment right now, I noticed my top 2 most shared posts have been removed from the list of most shared posts. I double-checked those 2 posts and saw they still have the same high number of shares, except they just don’t show up in the list. Do you know why this might be happening? Thanks.