Collapsing blogroll

Collroll is my new plugin that lets you insert your blogroll into a static page or into a post. The categories are collapsed by default. Here is how it looks like.

As Collroll uses the built-in blogroll no extra database table is used to store your bookmarks. Once the plugin is activated the background color for the category titles can be set. Have a look at the screenshot.

Download | Show download statistics

Collroll admin page

Leave me a comment if you wish some features. You can also chat with me if you add me to your friends list on facebook 1.

Ideas related to this plugin:

  • Link descriptions (planned for the next version)
  • A browser plugin for direct bookmarking a web page on your blog. If you’re a desktop application developer contact me please.
  • Sharing bookmarks with other bloggers. For instance you will be able to show bookmarks of your friends on your site or just set a link to them.
  • Option to open the link in a new page by default regardless of which setting is set while adding a new link.
  1. I’m the one with the hockey stick in the background


  1. I was trying out this plugin on my test site, and ran into a problem. As you can see at this page, it kind of breaks my theme. Any ideas?

  2. Slopjong

    Great, someone is using my plugin. This is motivation :)

    I’ve just took a look in your page code and I didn’t find anything strange. I’m analyzing it later on this day.

    Stay tuned.

  3. melissa

    The instructions on the wordpress download page are not clear how to insert this into a weblog. All they say is “Put in your post or on a page where the blogroll should appear.” I installed this from my WP admin panel, so I did not get the readme file that comes with the .zip — you should edit that installation language to describe more fully how to install.

    Once I downloaded the .zip, and saw there was a readme file, I see “Put in your post or on a page where the blogroll should appear.” However, adding a text widget with “” does not work. I tried editing the php for the sidebar directly and inserting ““, and it did not work.

    So, what are the exact steps to adding this to the sidebar (through a text widget?) or in the php itself.


  4. melissa

    And now I’m starting to wonder – can this not be used in the sidebar at all? Does it need posts tags around it to make it work?

  5. melissa

    It works great in a page itself (yippee!) – but if you have any tips on how to make it work in my sidebar, you’d be my hero!

    (sorry for the multiple posts…)

  6. Slopjong

    Cool, one more who’s using my plugin :)

    If you have some feature requests please let me know. My plugin might break your theme design, if so contact me.

  7. That took care of the problem. You might want to add that to your readme file.

    I do have a couple of suggestions. Convert it to a shortcode, rather than the comment code. That way people using the RTF editor can see where it is without switching to the HTML editor. And maybe allowing users to control the width of the field, rather than setting it to cover the entire page. And as melissa points out, a lot of people like the blogroll in the sidebar, so if you can create a widget, it will add to your possible users.

    Hope those give you some ideas. Thanks for the help getting the problem fixed.

  8. Tyler

    Hey, I just installed your plugin, but I’m not sure exactly what I’m supposed to insert into the page. I installed/activated the plugin, set up a page called ‘Links’, but what text do I insert into that page? Thanks.

  9. Tyler

    Nevermind, figured it out. Thx for the cool plugin. Keep up the good work!

  10. Hello, Great Plugin. I have a feature request. I’m using “My Link Order” to put my categories and links in the order I need them, however it’s a completely separate linking system apart from the default “blogroll”. Any way to set the link order for both categories and then links? Thanks!

    Courtney Bostdorff

  11. hi. Thanks for plugin



  12. Great idea! However, when I click Expand or a category header I get redirected to the first link in the category! See

    I’ll leave it in for the moment, but that is really awkward. Tested with FF3 and IE7.


  13. (Clicking the first category header seems to work OK)

  14. Solved, more or less: it is a conflict with the plugin Identify External Links. Now which one do I like more…

  15. slopjong

    No idea what Identify External Links is for. I don’t see any changes at the first glance if I activate that plugin.

    Update: Now I know what you mean. Well I’m trying to bugfix it. Stay tuned.

  16. Cool…. very cool

  17. Great plugin. How do I set it so the default is for the links to NOT be collapsed?

  18. chris

    How do you change the color of the text?

  19. slopjong

    @ Teresa: Not yet possible. I’ll add a new option for that.
    @ Chris: Not yet possible again. I’ll add a new option for that too ;-)

  20. Hi. Thanks for the plugin.

    What about columns to show blogroll links?

  21. slopjong

    Nice suggestion. Thx.

  22. Kim

    Can this plugin be used in the sidebar and if so how?

  23. slopjong

    No. Take a look at “Related plugins” in the readme file.

  24. misterjaytee

    Nice plugin. I have a couple of requests:
    * The links could do with the description displayed by the side (like the blogroll-links plug-in).
    * It would be nice if the default colours related to h1, h2 or h3 from the css

    Keep up the good work :)

  25. misterjaytee

    P.S. I like the way it leaves out empty categories (or ones with no visible links). That means I can make all the links in the default “Blogroll” invisible and they won’t display on my main links page.

  26. misterjaytee

    Just found out that you can display descriptions by editing the settings.php file.

    Two slight issues with the descriptions though:
    * Any html markup in them doesn’t work (sometimes I have related links there) – blogroll-links plugin does this okay, but I prefer your plugin ;)
    *There only a space between the link and the description – it could do with something like ” – ” in between.

    I’ll try and hack the php files for now to do this.

  27. misterjaytee

    Okay – thought I’d persevere and we’re nearly there:

    To display the description and put ” ~ ” between the link and description, edit the settings.php file – wp-content/plugins/collroll/settings.php

    From the line where it says “// Not stored in the database” substitute with this (until the end of the file):

    $collroll_default_settings = array(
    ‘category_order’ => ‘ASC’,
    ‘order’ => ‘ASC’,

    ‘limit’ => -1,
    ‘category’ => ”,
    ‘exclude_category’ => ”,
    ‘category_name’ => ”,
    ‘hide_invisible’ => 1,
    ‘show_updated’ => 0,
    ‘echo’ => 1,
    ‘categorize’ => 1,
    ‘title_li’ => ‘Bookmarks’,
    ‘title_before’ => ”,
    ‘title_after’ => ”,
    ‘class’ => ‘linkcat’,
    ‘category_before’ => ‘‘,
    ‘category_after’ => ‘
    ‘show_description’ => ’1′,
    ‘between’ => ‘ ~ ‘


  28. misterjaytee

    Sorry that didn’t work – I should have put code links around it!

    put this in the file:
    $collroll_default_settings = array(
    'category_order' => 'ASC',
    'order' => 'ASC',

    'limit' => -1,
    'category' => '',
    'exclude_category' => '',
    'category_name' => '',
    'hide_invisible' => 1,
    'show_updated' => 0,
    'echo' => 1,
    'categorize' => 1,
    'title_li' => 'Bookmarks',
    'title_before' => '',
    'title_after' => '',
    'class' => 'linkcat',
    'category_before' => '',
    'category_after' => '
    'show_description' => '1',
    'between' => ' ~ '


  29. misterjaytee

    Arghh! It’s not working.

    Okay, replace the last line in the array with this (and ignore the rest):

    ‘show_description’ => ’1′,
    ‘between’ => ‘ ~ ‘

  30. misterjaytee

    And to properly display hyperlinks (or other html) in the decriptions, edit the file

    In function _walk_bookmarks , find the line:

    $output .= $between . $desc;

    and replace it with:
    $output .= $between . $bookmark->link_description;

  31. misterjaytee

    The only problem I have left now is that the Expand/Collapse links do not work, but clicking each link does – obviously the function switchmenu works.

    When I click the Expand/Collapse links, I get a javascript error complaining that “el is null”.

    Any ideas?

  32. misterjaytee

    Okay, sorted that last problem as well – the clever bit that doesn’t display invisible bookmarks (or categories with no bookmarks) needs to be used in the closeall and openall functions.

    So I hacked frontend.php and in the openall and closeall functions, before the echo “var el = document… part, I added the code:
    $params = array_merge($merged_options, array(‘category’=>$cat->term_id));
    $bookmarks = get_bookmarks($params);
    if ( empty($bookmarks) )

    Thanks for the plug-in – it’s now replaced the blogroll-links plug-in :)

  33. Hi … error found in frontend.php :

    style tyle=”text/css”

    must be type

  34. melissa

    I know you pointed us to “Collapsing Links” as a way to get those into a sidebar widget… but that plugin is no longer supported, and doesn’t work for 2.7+.

    So, is there any chance you would consider incorporating your functionality into an accompanying widget?

  35. slopjong

    Yes there is a way. Few days ago I saw my plugin displaying the blogroll in the sidebar of one of my users. I had not time yet to figure it out. Thanks for your suggestion about “Collapsing Links”. I didn’t notice that it’s not compatible with 2.7+

  36. slopjong

    @Melissa: Use the ‘Text’ widget and type in [collroll]. This worked for another blog’s owner but not for me for whatever reason.

    It would be cool if I got feedback if this works for you or not.

  37. slopjong

    @Melissa: Check the website and take a look in the sidebar. As I can see ‘Collapsing Links’ works on wp 2.7+
    Give it a new chance ;)

  38. melvin


    I would like to change the text size of the categories on the page. It is too large in the theme I am using. Don’t want to change the theme though.
    Otherwise a great plugin. Exactly what I was looking for. I’ve moved from develping sites in Joomla to WP, and what a pleasure.


  39. slopjong

    This feature is already implemented. I was working on other things last days so I didn’t publish the new release. I still have to deal with a problem that I’ll solve soon.

  40. Jacki

    Thanks for the plugin – it’s really nice! I just wondered how you can edit it to make the links all open in a new window (ie target=”new”) as I don’t like sending visitors AWAY from my site completely.

  41. Jacki

    PS the fix for getting it to show in the sidebar did not work for me either – all I got was the same as you can see in your sidebar. Obviously some sort of code needs to go there as it is just reading it as text (also putting html tags in didn’t work).

  42. slopjong

    Jacki, tanks for this notice.

    I’ve decided to create a widget for displaying it in the sidebar but give me some time. I have to do other things first. I’ll modify the code too to set the target to “_blank”.

    Have a nice day.

  43. cp

    Is there an update for wp 2.8?

  44. slopjong

    Are there problems? I didn’t care about Collroll in WP 2.8 because it worked in my offline WP 2.8 installation. But I tested it 2 months ago so there could have changed some things.

    Let me know what problem you have.

  45. Brian


    Great plugin, but as nomercy points out there’s a typo on line 88 of frontend.php where ‘tyle’ is used instead of ‘type’ which makes validation fail.

  46. slopjong

    This bug was fixed but I forgot to tag the new version. First I have to fix some issues in another plugin. Thanks for your note.

  47. Amazing plugin, Mr. Schmitz. Thank you for creating it. And thanks for posting your hacks, too, misterjaytee, they were very helpful also.

    I have two quick questions regarding the settings.php.

    1) What’s the syntax for excluding a link category in the ‘exclude_category’ parameter? I’d like to exclude “Blogroll”, for example. If I put the name ‘Blogroll’ in between the quotes it still shows up in the collapsed list (unless I use the jaytee workaround and make every item on it private).

    2) What is the syntax for defining order of categories/links? Can they only be ordered by a generic sort of class (i.e. name, ID) or can you specify the precise ordering sequence within that particular parameter? i.e. have something like ‘category_orderby’ => ‘Blogroll1′, ‘Blogroll2′, ‘Blogroll3′, etc.

    If the sorting/ordering can not be specified directly, can you recommend a plugin that is compatible with yours that will accomplish the same task?

  48. slopjong

    Hi Chris,

    I haven’t worked for so long time on that plugin. I have to do a lot of things at the moment. I tell you more this evening.

    Edit: I’m skating tonight. You hear from me tomorrow.

  49. Darcy

    Great! Simple and easy to install & style. Many thanks for this!

  50. Chris Taylor

    One more quick question =) Using misterjaytee’s hack we can include the descriptions of the links themselves… is there any parameter we can used to display the link category after the category name/title? i.e. (link category) — (link category description)?

Trackbacks / Pings

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>