Support » Fixing WordPress » Link Categories

  • I dislike how the <?php get_links_list(); ?> function outputs the category headers in a nested list with a class id. (Actually I find it a little presumptuous to automatically assign the categories a class id; what if I happened to have another id with the same name already in my document?)
    Is there any way to modify the results so the categories and links are output as below? I understand I can replace the

  • tags with <dd>, but that doesn’t change how the categories are represented.
    <dt>Category 1</dt>
    <dd>Link 1</dd>
    <dd>Link 2</dd>
    <dt>Category 2</dt>
Viewing 4 replies - 1 through 4 (of 4 total)
  • A dl is used for a defintion list. The categories, or the links above, are not not lists of definitions, they are, at best, an unordered list, which is why they are the way the are.
    The function get_links_list returns an unordered list of links, as should be expected, I guess.
    That said, you could write your own functions to custom ends.

    I don’t need XHTML advice, thank-you-very-much. 😉
    A definition list is absolutely appropriate for a list of links, it’s even suggested inside one of the W3C’s documents as an example, and there’s an A List Apart article explaining why this is appropriate. That aside, I don’t think I should have to delve into the PHP code and modify the function to alter the output of this function. If I can replace the list tags, why not the category ones?

    Sorry, it wasn’t A List Apart, but this page.

    Sorry marky, I am often wrong.
    you could post the proposed change as a feature request, or make the changes yourself and make it available to the others and the devs

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Link Categories’ is closed to new replies.