Adding Sites to Sociable

July 16th, 2009 – 54 Comments

While Sociable comes with a pretty large set of sites, there are always people that want to add their own. While this is pretty easy to do, you’d have to update the plugin every time it’s updated, which is quite often, so that’s not really a workable solution.

Today, I’ve fixed that. I’ve just submitted version 3.4 to, this version makes it possible to add sites to Sociable from either a plugin or from your theme.

You’d simply have to do the following:

function sociable_add_sites( $known_sites ) {
  $known_sites['Joost'] = array(
    'favicon' => '',
    'url' => '',
    'description' => 'What else would you do?'
  return $known_sites;

As you can see you can easily add your own sites now. The favicon URL can be both an absolute URL to the file, or just a filename. If it’s just a filename Sociable will look for it in the image directory you’ve defined in the backend.

You could also use this functionality to change the icon for a certain site, just add the following to the code above (before the return statement):

$known_sites['']['favicon'] = '';

As said, you can either add this code into a plugin, or put it into your themes functions.php file. After doing that, the site will become available for you to pick in the Sociable admin panel.

Update: version 3.4.1 also fixes the Sphinn submit button, to work with the new version of Sphinn.

54 Responses to Adding Sites to Sociable

  1. Simon
    By Simon on 16 July, 2009

    Great update Yoast! Makes it easy to add lokal services now.

  2. Jermaine Young
    By Jermaine Young on 16 July, 2009

    I may just use this one day. Thank you.

  3. Blogs d'école
    By Blogs d'école on 16 July, 2009


    Would be great to have the same for the customs images. I’ve changed the images to bigger ones, and I have to update that every time the plugin is updated … :(

    • Joost de Valk
      By Joost de Valk on 16 July, 2009

      What would you need to change then? You can simply specify an image dir right? I use bigger images myself and never have to change a thing…

  4. Karl Foxley
    By Karl Foxley on 16 July, 2009

    This is a very welcome addition… thanks for this!


  5. brita
    By brita on 16 July, 2009

    Hi Joost,

    I just upgraded to 3.4.1, and when I tried to update my settings, got this message: Fatal error: Call to undefined function: screen_icon() in /home/jmainehu/public_html/podcast/wp-content/plugins/sociable/sociable.php on line 982

    Sorry not to post this on WordPress user forums…

    • Joost de Valk
      By Joost de Valk on 16 July, 2009

      Update your WordPress. Screen_icon was introduced in 2.7, 2.6 is insecure, so: update.

  6. Evan Mullins
    By Evan Mullins on 16 July, 2009

    Awesome idea! I was just thinking about digging into the source to add sites to my list! You’ve made it too easy not to customize it now! I’d request a special settings section in the sociable settings page with a space where I could type php to add sites and they would be saved even when updating the plugin! But I’m stoked, I’ve already added a site to my sociable list!

  7. teknoloji
    By teknoloji on 16 July, 2009

    thanks for this abdurrahman

  8. Jordan
    By Jordan on 16 July, 2009

    Thanks for the great site, Yoast. While we’re on the subject of Sociable, what kind of response have you had with it? Does it really seem to encourage people to share your links on social networks and ultimately drive traffic? I’ve been considering using it for some time on my own site, but I don’t think I’ve ever actually used the links anywhere else around the web. Maybe that’s just me, though.

    • Joost de Valk
      By Joost de Valk on 17 July, 2009

      it works well, but don’t take my word for it, test it!

  9. Roy
    By Roy on 16 July, 2009

    Good idea, i’m off to try and figure out how to use custom images…

  10. reesan
    By reesan on 17 July, 2009

    Hi Yoast, love your plugin and was excited to read this article as I was forever re-adding

    However, this is probably my complete ignorance so I apologise in advance, I added the code above to my functions.php as per below:

    function sociable_add_sites( $known_sites ) {
    $known_sites[‘JapanSoc’] = array(
    ‘favicon’ => ‘japansoc.ico’,
    ‘url’ => ‘’,
    ‘description’ => ‘JapanSoc’
    return $known_sites;

    But this gives me the following fatal error:

    Fatal error: Call to undefined function add_filter() in /******/wp-includes/functions.php on line 3357

    When I strip out the add_filter I have no fatal error but no ‘known sites’ functionality either.

    Like I said, this is all probably my foolishness… does the add_filter command have to go in a different location than functions.php?

    • reesan
      By reesan on 17 July, 2009

      sorry to disturb. i knew that it would my my own stupidity. i placed the code in the wrong functions.php! d’oh!

      all resolved now. thanks for listening. :-)

      • Joost de Valk
        By Joost de Valk on 17 July, 2009

        Glad you’ve got it working!

  11. otoharley
    By otoharley on 17 July, 2009

    i love sociable plugin. This plugin is very great. Many thanks

  12. det
    By det on 17 July, 2009

    it worked as a charm!!!

    thanks for your GREAT job!!

  13. Blogging Contest
    By Blogging Contest on 18 July, 2009

    Great update Yoast! Thanks for sharing it…

    Indo Contest

  14. Ghufron
    By Ghufron on 19 July, 2009

    Nice info! I will try the code above on my theme. I using Arthemia theme. Thanks!

  15. boomint
    By boomint on 20 July, 2009

    Great plugin Yoast! Thanks for sharing to us..

  16. Navjot Singh
    By Navjot Singh on 20 July, 2009

    I am trying to add multiple sites by using this function in the form:

    function insociable_sites( $known_sites ) {
    $known_sites = array(

    ‘Social1’ => Array(
    ‘favicon’ => ‘image1.png’,
    ‘url’ => ‘’,

    ‘Social2’ => Array(
    ‘favicon’ => ‘image2.png’,
    ‘url’ => ‘’,

    It does adds these sites but removes all others provided by default. It just shows these two and the remaining default selected sites. All other inactive sites are disabled. Infact the images shown by the default selected are also not shown.

    How to fix this?

    • Navjot Singh
      By Navjot Singh on 20 July, 2009

      OK fixed it. Got the basics of PHP wrong. :lol:

  17. Navjot Singh
    By Navjot Singh on 20 July, 2009

    I have just released a Indian Version of Sociable at – It uses the above function. Thanks Joost for this.

  18. micro komputer
    By micro komputer on 22 July, 2009

    This is a very welcome addition… thanks for this!

    best regard

  19. Joelle
    By Joelle on 22 July, 2009

    I love the Sociable plugin as well and thanks for the tips on how to add more sites to the list. However, I was curious if this issue had been addressed?

    I’m using WP 2.8.2 and Sociable 3.4.1 – but it was having this challenge with 2.7.1 and 2.8.1 as well.

    Thank you!

  20. Zim
    By Zim on 24 July, 2009

    Great! I was just going to suggest you the site “Chuenga”. Good information :)

  21. alfon
    By alfon on 27 July, 2009

    wow a good idea & thanks for sharing :)

  22. juust
    By juust on 27 July, 2009

    Joost, are you planning on adding a store for accountnames and passwords to Sociable ? It would give the plugin a lot more potential uses.

  23. WildcatDigital
    By WildcatDigital on 27 July, 2009

    I was JUST wondering if adding custom sites would be possible. Thank you!!

  24. Happy Hotelier
    By Happy Hotelier on 29 July, 2009

    Hi Yoast
    After having tried the tweetmeme plugin and finding out it gave too many errors, I now see your sociable plugin gives too many errors when validating my sites and deactivated it.

  25. musab
    By musab on 29 July, 2009

    thanks for a great job

  26. Adi Sabarwal
    By Adi Sabarwal on 30 July, 2009

    Thanks for the plugins. I’ve been reading on your site for the last 5 hours and implementing all the advice/plugins onto my new blog before I ‘officially’ open it.

  27. Kaitlin
    By Kaitlin on 31 July, 2009

    I assume this means that it will now be possible, for example, to add functionality that is in other plugins (for example, WP-Email). My PHP is a bit soft, though, so I’ll have to play around to figure out how to make the URL pull the WP-Email URL.

  28. Paul Lear
    By Paul Lear on 3 August, 2009

    I’ve not installed sociable on my blog yet, I guess I better get a move on & do it. :D

    Great post, great info.



  29. N3RI
    By N3RI on 7 August, 2009

    WOW! Thats my idea, cool! Thanks!

    But, I have a question. If I put this php code on funtions.php what happens when they update wordpress and they have a new funtions.php file?

    Isn’t it the same problem than before? I asked this feature because every time you upgrade the sociable plugin, it overwrite the edited sociable.php file and my site disappears. Now, every time wordpress upgrade the functions.php file it will overwrite the edited file?
    I think the ideal solution is one that you have not to edit a wordpress file, like a second sociable.php file, something like “sociable_extra_sites.php”

    Sorry if I’m wrong. Your plugin is so cool and useful.

    • Kaitlin
      By Kaitlin on 7 August, 2009

      functions.,php doesn’t get replaced when WordPress is upgraded/updated. Functions.php is a part of your theme, and not part of the WordPress core that is being upgraded. Even if your theme is updated, *most* theme authors aren’t updating the functions.php file because the whole idea is to have things that the user defines that don’t get messed up when updating WordPress or the theme.

  30. Louise
    By Louise on 9 August, 2009

    I am a newbie. When you talk about adding codes and things – does that also apply if you use the uploads. I just upgraded and am wondering if that takes care of it or if I need to do something else.


  31. Veronica
    By Veronica on 14 August, 2009

    Hi there,

    Just did an upgrade of sociable, but nothing seems to work right now…
    Checked settings & found a whole list of notes such as this:-
    “Warning: Missing argument 2 for checked(), called in /home/patron/public_html/blog/wp-content/plugins/sociable/sociable.php on line 1065 and defined in /home/patron/public_html/blog/wp-admin/includes/template.php on line 363
    checked=”checked” /> Front page of the blog”

    Any advice you can give?

    • Julie
      By Julie on 16 August, 2009


      I am experiencing the same issue as Veronica – same error message. The wordpress version i am using is 2.7 – is this the problem? Is the new version of sociable unstable when used with wordpreass 2.7.
      If this is not the case could you please advise what is the problem and how to rectify

  32. Martijn
    By Martijn on 17 August, 2009

    Just had this problem last night as I was trying to add some Taiwanese sites to Sociable.

    I had found some sites and Icons in this post:

    Now I will just rework my theme instead.

  33. Bayrak
    By Bayrak on 18 August, 2009

    Thank you plugin

  34. rawloader
    By rawloader on 20 August, 2009

    Thanks a lot, it very helpful.

  35. Gerard
    By Gerard on 20 August, 2009

    Hi Joost, I modified Sociable 3.4.4 to add ShareThis as an option. This is for a site that wants the most popular social bookmarking options clearly displayed in an uncluttered way, with ShareThis taking care of most others. If you’re interested in including this in a future version I can send you the code. It does complicate things a bit: a ShareThis publisher ID is needed (with a field in the admin area to enter it) and JavaScript is required. A moderate amount of special case code to make it work.

  36. Teknoloji haberleri
    By Teknoloji haberleri on 20 August, 2009

    thank you plugin admin

  37. Hesham
    By Hesham on 29 August, 2009

    This is great news, I was contacting you before for this reason, but I thought it will be hard work for you with all these social websites coming all the time to life!

    Thanks for the good idea, and your support!

  38. Katyusya
    By Katyusya on 2 September, 2009

    Thanks you for your support.

  39. discount web design
    By discount web design on 3 September, 2009

    Thanks for such excellent post. Really informative blog. Keep the good work here and i wish you all the best and success.

  40. Gilgamesh13
    By Gilgamesh13 on 8 September, 2009

    Hi !

    I just noted that when I activate your Sociable plugin Version 3.4.4, it runs well, but the dashboard disappeared (WordPress 2.8.4 – Arthemia Premium Theme).

    Thanks !

Check out our must read articles about Analytics