Link categories: "Between Link and Description" bugfix/workaround

By | November 18

We are currently using the 2.0.4 version of wordpress and I have discovered that the “between link and description” property for link categories is being completely ignored by the system. As i am not really into the architecture of worpress yet i am not sure if its a real bug or if the feature should be activated somewhere but as i have seen on the wordpress support boards it seems to be a bug and people strugle to find a nice workaround/bugfix for this. I have a stylesheet solution for this.

I played around with the stylesheet and found a solution for this which just touches the Sidebar file and the stylesheet of the default theme. It will generate a line break after the link title. The following needs to be done:

Open the Sidebar file and search for get_links_list() function call and replace this with the following code:

  1. <div id="linklist">
  2.   <ul><? get_links_list() ?></ul>
  3. </div>

What we do here is we create an own container for the linklist in order to be able to refer to it afterwards in the stylesheet. As the sidebar is built of lists we need to close down the list before and open it afterwards again to be able to bang in the DIV around the function call. The next step is opening the stylesheet of the theme and overriding the definitions for the listitems within the linklist. Add this to the end of your stylesheet:

  1. #linklist ul li a {
  2. display:block;
  3. }

What we’ve done here is a trick that the A-tag displays as a block and therefore the description is on a new line. In Internet explorer this works fine already but in Firefox we still have the list bullets and they’re displayed also in a new line. What we can do is to get rid of them by adding another rule to the end of the stylesheet:

  1. #linklist ul li ul li:before {
  2. content:"";
  3. }

The list bullets are defined with the :before pseudo class using the content property. We’ve just overriden this to display nothing.

That was my quick solution for this small problem. I am curious about other solutions. So lets post them here if you’ve another tips & tricks.

One comment on “Link categories: "Between Link and Description" bugfix/workaround

  1. Have you found a fix for this yet?