WordPress plugin to share posts via facebook, twitter etc

Social media is often used to help publicise blog posts. Here’s a little WordPress plugin which adds links to the bottom of a post to share it by Email, StumbleUpon, Digg, Facebook and twitter.


This plugin uses the techniques I’ve outlined in these articles:

If you find the icons included (which are 48×48 pixels) are too large then here are some 32×32 pixels smaller designs.

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter


  1. Hello:

    Just wanted to let you know that the plug in sees pretty good. I did find what appears to be a bug – at least for my set up. The Facebook post works – but does not send the info necessary for the Facebook post to be a link back to the website. I have another link on my site for Facebook & that works – but it would be nice to have the icon & functionality from your plug in. Just wanted to let you know.

    I can link back on my iPhone from Facebook to my site with the other link (other plug in) but not when your plug in places the post.

  2. A follow up: the link from your plug in CAN link back to the website from a regular browser online (ie: Chrome) but NOT from the iPhone. The other P/I posts can link back from the iPhone

  3. Hi Richard,
    Interesting. What do you get when you click the link on an iPhone? Unfortunately I haven’t got an iPhone so I can’t test. It works on all the browsers I’ve tested on. I’ve gone to great lengths to make the XHTML vaild (hence there’s a lot of encoding going on!) and I wonder if that’s tripping it up.

    BTW, if you want to use the images then they are also free to use.

  4. I have just started a second wordpress blog and loaded the share this widget. I do not have an admin page that allows me to select which icons appear. I prefer to have just the I Share icon as seen on my other website at http:michaelpatton.net

  5. Hi Michael, I’m sorry to say that’s a different plugin there. Try http://wordpress.org/extend/plugins/share-this/
    It’s a more complex and functional sharing plugin. Mine is very simple and doesn’t use any javascript. The code is quite simple to read if you want to edit it to delete or comment out some of the buttons. I’m happy to help you out and explain that if you need.

  6. I can’t find where to set the options for this plugin – there is nothing showing under the ‘settings’ menu in the WP control panel. I’m on WP3.0.1 and using theme Atahualpa 3.5.3.

  7. Hi Grahame, there is no options page for the plugin. It’s the simplest plugin I could write to do the job – no javascript, no extra database tabes, no admin pages.

  8. Sep 16 21:20:39 xxxx suhosin[19640]: ALERT – script tried to increase memory_limit to 134217728 bytes which is above the allowed value (attacker ‘xxx.xxx.xxx.xxx’, file ‘/wp-content/plugins/jw-share-this/jw-sharethis.php’, line 28)

    Any reason just going to a page with your plugin on it would cause it to try and take 128mbs of ram?

  9. Yep, it sets the memory limit to 128MB when it starts. I figured some people will want to use this for huge numbers of posts so I set it high. Most plugins seem to do this. I also set a time limit of 20s. Any reason your server can’t handle 128MB of memory?

    Add “//” in front of line 28 to make it:

    and that should fix the problem.

  10. no particular reason other than most hosts like to keep it much lower so a few scripts dont yank all your memory.

    thanks for the response!

  11. When running this plugin on a webnode with php’s safe mode enabled, I’m getting tons of the following error messages in the php.log:

    Cannot set time limit in safe mode in /wordpress/wp-content/plugins/jw-share-this/jw-sharethis.php on line 27

    Could you please check for safe mode restrictions before trying to set the timelimit to make these error messages go away in one of the next versions of this plugin?


  12. Good idea. Maybe I should just not set a timelimit at all and assume the server has a reasonable default?

  13. James,
    Have installed the Plugin and its working great.
    I am a novice and do not like playing with changing HTML.
    Is there an easy way to change the Icons to the smaller size you have provided as an alternative without my changing HTML?
    If I don’t want the plugin on every page what do I do.
    Thank you for your coutesy.

  14. Hello,
    I love the ability to have smaller icons on my site, but I cannot get the plugin to load successfully. It says ‘invalid header’. What am I doing wrong?
    Many thanks

  15. Hi Mark,
    If you can replace the image files with the ones in the zip file (/files/jw-share-this-icons-32×32.zip) then that’ll give you smaller images without having to change any HTML.

  16. Hi Debbie,
    What version of WordPress are you using? When are you getting the error message, when you use the plugin in a page or when you install it?

  17. Hello there. Like the plugin just fine. I am getting this message after the idons though:
    Like You like this.Unlike · Add Comment · Admin Page · ErrorYou like thisBe the first of your friends to like this.Unlike · Add Comment · Admin Page · Error
    Is this from the plugin? I am not sure, and not a web guru, rather a designer.

    Go here to see it at the end of the post.


  18. Hi there, I like your plugin.

    If you could supply us with a php template code that would be awesome. I would like to place the links in top of some of my pages as well!

  19. James, I am REALLY new at this and so sorry for my ignorance. I have the same question as Mark, but don’t know how to go about replacing the image files.


  20. good plugin, i like this

  21. Sorry, I’ve been out with the flu for a while so there’s been a big break in my responding to comments.

  22. @Eric: Looks fine on the site, if you’re still having trouble could you send me a screenshot?

    @Fredrik: I’m not sure what you mean by “a php template code”. To put the plugin at the top requires changing the code. There are plugins which will work at the top. I didn’t want to add an admin page for plugin, I wanted it to be really simple so there’s no-where to set options like this.

    @Kim: You’ll have to replace the file on your host’s web server. The way to do this differs from one host to another but usually you have FTP access to the server. To find the files go down the directory structure: wordpress/wp-content/plugins/jw-share-this

    @teo_chew: thank you!

  23. Thanks for the plugin. I’m having an issue where the title/link of the blog post is getting truncated in your ShareThis link. Is there some sort of character limitation?

    For example, please see this page: http://www.la-story.com/blog/2010/12/mercury-retrograde-survival-guide-part-2-mercury-retrograde-holiday-stocking-stuffers/

    When you click the “Facebook” icon, the link is truncated (and is copied into the FB post truncated). Even if I click on the link, post the correct link manually, then click the link to post to my FB page, it’s still truncated.

    I appreciate your help

  24. Hi. This is a great plugin and I like its simplicity. Is there a way to have the icons only appear on posts and pages containing posts, v actual pages? That would be really helpful. Thanks.

  25. I’m a non-tech guy and this is the best plug-in I have found for this job. I was wondering if there was any way to have it placed on just my posts.

    I use a Woo Theme and when I set my contact page as a contact page the Share This widget show up above the comment box. Looks weird.

    Thanks, Phil

  26. My plugin is not showing in the settings section of wordpress. I already installed it. Am I doing something wrong?

  27. Hi Dorian. No, you’re not doing anything wrong. I wrote the plugin to be the simplest possible for the task so there is no settings page.

  28. hello
    the plugin not working on twitter any more, you can check it by your self.

  29. The TWITTER link goes to twitter but does not fill in the comment box. This used to work ok on all of my blog sites but now doesn’t work on any of them. Has something changed?

  30. I like the look of the buttons but my Twitter Icon is not working? It only takes me to Twitter but does not share the story? Please advise.

  31. Paid work has been getting in the way of plugin development. The Twitter problem is fixed – they changed the format of URLs for submitting. The ZIP file in the link above has been updated and the WordPress plugin repository should be updated soon.

  32. twitter problem not seems solved

  33. I’ve been using jw-sharethis plugin for awhile. Today it crashed and locked up my wp-admin website. I had to disable it. Any news about this? Why would it crash?

  34. The message at the top of my wp-admin plugins page is this:

    The plugin jw-share-this/jw-sharethis.php has been deactivated due to an error: Plugin file does not exist.

  35. @umberto: What exactly happens? Can you post the link generated by the plugin that appears in the page? Are you definitely using v1.1?

  36. Sounds like it’d be best to uninstall and reinstall. No idea why the plugin file isn’t there. There is nothing in the code to make it delete itself so I’m guessing the problem lies elsewhere on your server.

  37. please i have install your plug ing, it is show in every page of my site but i dont need to show it in just oe specific page, how can i do it?
    thanks a lot

  38. This is the best social networking plugin I have found. Thanks very much

  39. i am having a conflict with share this and a sitemap page… in previous versions of share this, we had an option to disable the plugin for pages…or posts.. I don’t see anyway to disable this on pages now.

Leave a Comment