[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:
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.1: grouped-links-widget.2.0.1.zip
Installation
- Unzip grouped-links-widget.zip inside the /wp-content/plugins/ directory; a sub-directory grouped-links-widget is created
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Place and configure your Grouped Links widgets via ‘Design / Widgets’ menu
Version History
[2.0.1] — Adapting to WP 3.0, fixing »empty list bug«
[2.0.0] — Refactoring to adapt WP 2.8 multi widget functionality
[1.x] — see version 1.x
June 14, 2009 at 18:50
Works great, thank you..
July 6, 2009 at 16:52
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
July 6, 2009 at 17:18
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.
September 7, 2009 at 11:18
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?
September 7, 2009 at 11:34
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.
September 10, 2009 at 09:38
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.
September 15, 2009 at 18:40
Grouped Links in word press dynamic content updated need all Grouped link code in sidebar.php is it possible ?
September 15, 2009 at 19:21
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?
December 13, 2009 at 10:30
how do we link the grouped links title to a page, … when i create categories, there is a box called slug,…. i want to use that slug to link to a page which has all the links in that category.
for example, im showing only 10 links in one grouped links widget with category called “my publications” ,… rest of them i have put on a page, i want to link the title (TITLE ) of the widget to this page.
please advise.
Ravi.
http://bedtea.in
March 25, 2010 at 10:28
Ravi, I am sorry for the late answer, but your comment was captured by the spam filter which I just saw today.
And second sorry: I don’t see any possibility to do your task, because the WP-function http://codex.wordpress.org/wp_list_bookmarks used by the widget does not allow to do that (using the slug to create a link using the title of each category).
December 18, 2009 at 00:53
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
December 18, 2009 at 00:54
Please note that the url of the site that I want to use the widget on is http://ss-designs.co.uk/troyblog
December 18, 2009 at 11:50
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
December 26, 2009 at 18:15
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).
December 27, 2009 at 19:06
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
December 28, 2009 at 12:04
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).
December 28, 2009 at 18:21
Thank you. Now I understand! I will definitely use the plugin on my next project!
February 8, 2010 at 11:34
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?
February 8, 2010 at 11:51
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).
February 8, 2010 at 11:59
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
February 8, 2010 at 12:04
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
February 8, 2010 at 12:13
(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.
February 10, 2010 at 16:56
Ok, here’s a quick hack for you: edit grouped_links_widget.php and comment out lines 52 and 53 (with “category_before…” and “category_after…”) by putting ‘#’ in front of these lines (like already done in line 51).
Now, each link group defaults to <li id=”[category id]” class=”linkcat”>
Have fun!
February 10, 2010 at 17:12
The same effect can be reached by putting the following tag code into the opening tag field for “each link group” at grouped links options:
<li id="%id" class="%class">
Save it, and that’s all.
March 9, 2010 at 03:43
Is there any way to have the links sort by date the page the link is referencing is published? I have them dated by date with month then year and of course with alphabetical sorting it’s not working right.
March 9, 2010 at 14:34
You can try to modify the code. Have a look at lines 50 and 51 in grouped-links-widget.php. Comment out line 50 by putting a ‘#’ in front of the line (as 51 has). Then enter a new line after 51 saying
orderby => ‘updated’,
Don’t forget the comma at the end of the line. Then remove the comment character (‘#’) from line 51 (order => $cat_order,). This could work if I understand you correctly, but I didn’t test it.
For more usage details of wp_list_bookmarks have a look at http://codex.wordpress.org/wp_list_bookmarks
September 18, 2010 at 02:13
I attempted to do this but I couldn’t successfully achieve the desired results. I am trying to sort the links by rating. Has anyone figured out a way to do this with this plugin? I really would like to use this plugin as it works great but I really need this feature. Any help would be greatly appreciated.
September 25, 2010 at 12:55
Jamie, as far as it is described by http://codex.wordpress.org/Function_Reference/wp_list_bookmarks you have to do the same as explained above, however, enter the new line with
orderby => ‘rating’,
Don’t forget to comment out line 51 (‘category_order’ => $cat_order,) using ‘#’. I did not test this.
September 25, 2010 at 18:09
I now have it working thanks. The problem was in the description you mentioned to remove the comment from order => $cat_order,. When I made the change by adding that line if I remove that comment it doesn’t work. But if I leave teh comment for that line then it works fine. Thanks for the help and for replying.
May 10, 2010 at 19:42
Hello, This plugin seems to operate great on my wordpress 2.9.2 installation, however I checked my server logs and there are pages of this error:
Invalid argument supplied for foreach() in /home/wordpress/wp-content/plugins/grouped-links-widget/grouped-links-widget.php on line 72
Any ideas? Thanks in advance for your help.
May 11, 2010 at 09:25
If the error is thrown from line 72 then this happens during configuring the widget in the admin widget area. Thus you should have observed this error during handling with the widget. Users of the frontend should not be annoyed by receiving an error.
Nevertheless, there is an intermittently appearing error. Unfortunately I can not reproduce this error. If you find a way to reproduce the error, then please tell me.
August 8, 2010 at 18:44
I fixed this bug, please check out version 2.0.1.
July 13, 2010 at 17:23
How is WordPress 3.0 compatibility with this plug-in? I’m trying to make sure all of my plug-ins are compatible before upgrading. [wordpress.org/extend/ currently has no stats for this plug-in with 3.0 users]
July 13, 2010 at 19:50
Yep, the plugin also works with WP 3.0!
July 13, 2010 at 19:56
Thanks for the prompt reply.
September 16, 2014 at 16:54
Will you be updating this for WordPress 4.0?