Version 2.x for WordPress 2.8+

[Grouped Links Widget, version 1.x for WP 2.7 and below is available here]

Grouped Links Widget can use an unlimited number of widget instances to group links by their associated link categories. This adds a bit more CMS functionality to WordPress.

If the blogroll is grouped into link categories and each category contains internal tag references, then you can flexibly group link categories and put these link groups into your sitebar(s). This, of course, works with traditional external links put in a blogroll too.

Here is a picture about how this works:

Using Grouped Links

Using Grouped Links Widget (Note: the second group is reverse sorted)

Each group of link categories can be sorted by name acending or decending. If simple sorting doesn’t fit to your desired order to appear in the sidebar, then create more than one link group and place them in the sidebar as you wish.

Options

In order to adapt Grouped Links Widget to different HTML theme codes, HTML tags can be set for each link group and for each title within the link group. However, default values should work with most themes.

Update from 1.x

Please save your link groups on paper (or what else), because given configurations of link groups will not be taken over from version 1.x to version 2.x.

Coding

Grouped Links Widget is a simple widget, it mainly uses wp_list_bookmarks. Version 2.0 was completely refactored in order to adapt to the new WordPress 2.8 multi widget technique. If you want to add more functionality, don’t hesitate to modify the code ;-)

Download

Download of Version 2.0.0: grouped-links-widget.2.0.0.zip

Installation

  1. Unzip grouped-links-widget.zip inside the /wp-content/plugins/ directory; a sub-directory grouped-links-widget is created
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Place and configure your Grouped Links widgets via ‘Design / Widgets’ menu

Version History

[2.0.0] — Refactoring to adapt WP 2.8 multi widget functionality

[1.x] — see version 1.x

20 Responses to “Version 2.x for WordPress 2.8+”

  1. baron Says:

    Works great, thank you..

  2. Herbert Says:

    Feines Plugin! Danke für die Arbeit!
    Du hast es ja als Widget konzipiert. Ich würde gerne eine ganze Linkseite so gestalten. Kann ich da z. B. einen Code in ein Page-Template eintragen, so dass die Infos statt in einem Widget auf einer Page erscheinen?

    Viele Grüße!

    Herbert

    • StefanMz Says:

      Ja, das ist recht einfach (wenn du eh schon am Code bist): Du verwendest dafür pro Link-Gruppe die Funktion wp_list_bookmarks. Diese Lösung hat dann mit dem Grouped-Links-Widget allerdings nichts mehr zu tun, du musst also Änderungen stets am Code vornehmen.

  3. Michael Says:

    Hallo,

    dein Plugin macht der Beschreibung nach genau das,was ich suche. Leider nur bei mir nicht. Plugin aktiviert, Widget platziert – nada.
    Haste du einen Tipp?

  4. Michael Says:

    Hoppla, nun geht’s doch. Einmal das Theme gewechselt und wieder zurück, dann erscheint das Widget. Leider ist der Abstand zwischen dem Titel und dem ersten Eintrag riesig.

    • StefanMz Says:

      Abstände und so’n Kram bitte in deinem CSS einstellen. Wenn du dafür spezielle Auszeichnungen brauchst (Überschrift-Tags: manchmal hilft schon ein Wechsel von h3 nach h2 oder umgekehrt), kannst du die in den Optionen setzen.

  5. sanket Says:

    Grouped Links in word press dynamic content updated need all Grouped link code in sidebar.php is it possible ?

    • StefanMz Says:

      I am not sure, that I understand what you want to do: You don’t need to put any code in sidebar.php directly, you only have to add grouped links widgets in your wordpress widget admin interface to the sidebar you wish. The presentation is done by wordpress automatically.

      If you aim to put the grouped links widget code directly into the sidebar.php, then I have no idea how to do this. Anybody?

  6. troydavisfilm Says:

    Hi
    I installed the widget, and it works well. However all the other items in the sidebar disappear when I activate it.
    Please can you tell me how I can resolve this problem? I had it in the left hand sidebar

    Many Thanks

  7. troydavisfilm Says:

    Please note that the url of the site that I want to use the widget on is http://ss-designs.co.uk/troyblog

  8. troydavisfilm Says:

    I have now resolved the above problem. However, I now have my links showing in their categories, but I also have my original links listings showing up. Please can you advise how to get rid of the default links list so that only your categorized links show. My blog is listed above.
    Many thanks
    Sarah

    • StefanMz Says:

      Hi Sarah, sorry for my late reply, I was in holidays. I am not sure, that I understand your problem correctly, because my answer sounds too simple: If you want to get rid of the old links being displayed, then you have to remove the respective old links widget, because now the links are displayed by grouped links widget.

      Please clarify if I didn’t get the point (e.g. which widgets you are using and what is displayed).

  9. sarah sellers Says:

    Hi
    Thanks for you reply. I have now stopped using this widget as I could not see what to do. However I would still like to know as I have other sites that need to be created.
    My original links were part of my blogroll and are added via the administration panal. It is there I allocated categories to them. Once I installed your widget, I had by blogroll links showing which were duplicated by your widget. I do not have another links widget installed and I believe the blogroll is part of the structure of a wordpress site.
    I hope O have explained it a bit better now?
    Many thanks
    Sarah

    • StefanMz Says:

      The blogroll is nothing else than a link list having the category “Blogroll” (or “Linklist” in older WP-versions). Thus you can remove the blogroll-widget (named “Links”) and let the blogroll-links being displayed by grouped links widget.

      The other option is, that you use the standard blogroll widget (“Links”) and check out the link category “Blogroll” in the grouped links widget.

      Please make sure, that you have customized all sidebars, otherwise a default set of widgets will be displayed (e.g. including the blogroll in the left sidebar).

  10. sarah sellers Says:

    Thank you. Now I understand! I will definitely use the plugin on my next project!

  11. tracey Says:

    Hi Stefan,

    I’m getting the following error in the latest wordpress version:

    Warning: Invalid argument supplied for foreach() in /wp-content/plugins/grouped-links-widget/grouped-links-widget.php on line 41

    Can you suggest what the problem might be?

    • StefanMz Says:

      Do you have link categories used by published and visible links?

      At the given point where the error raises, all link categories are looped, but I did not check before, if there is any at all. However, I tested this with “no links” and “private links” etc. and everything works (no groups had been displayed as expected).

  12. tracey Says:

    Ok, that seems to have resolved itself. Weird.

    However I do have another question. Is there any way of adding a dynamic class to a surrounding div so that I can style the categories differently (add a category icon)?

    Something like this is what I’m after:

    Category1

    Link Here
    Another Link Here

    Category2

    Link Here
    Another Link Here

  13. tracey Says:

    crap. try again

    div class = Category1
    h4 Category1 /h4
    ul
    li Link 1 /li
    li Link 2 /li
    /ul
    /div

    div class = Category2
    h4 Category2 /h4
    ul
    li Link 1 /li
    li Link 2 /li
    /ul
    /div

    • StefanMz Says:

      (It’s WordPress which removes the tags in the simple commment fields).

      Yes, using different classes for the displayed groups is a good idea. Will look after that, but I can not say, how long this will take.


Leave a Reply