Support » Requests and Feedback » Links List ( a plea for proper category heading ta

  • I’ve mentioned this before and it didn’t go anywhere. I ended up hacking WP’s innards to get what I wanted, but after several updates, it’s getting old. So I’m back, and this time I ain’t going down without a fight ; )
    Currently, the xhtml used to mark up the Link List has 2 probems.

    1. It severely limits the ways we are able to apply css.
    2. It isn’t semantically as strong as it should be

    Using the default as an example:

      <li id="links">Links

    It is impossible for me to style(e.g. padding-left: 1em;) the word ‘Links’ without also affecting the nested list that follows (i.e. Alex, Dougal, Matt, etc.). (In this case the nested list that follows would also have the padding applied)
    If the word ‘Links’ were just marked up in any way at all(even a dreaded span tag would do)–rather than just hanging out naked in this giant list item–then I could add padding without affecting the list.
    Semantics are obviously important to WP developers and users, otherwise the entire menu wouldn’t be marked up as a series of nested lists. Which is why I don’t understand why in this case ‘Links’ isn’t marked up as an h4. After all, it is a heading for the list that follows.
    I know there are those who oppose all but the most minimal markup necessary to get the meaning across, even if that means leaving no hooks for css. But in this case–semantically speaking–I argue that it is more important that the word ‘Links’ function as a heading(describing the list of links that follows), than as a member of the menu ‘unordered list’.
    But the beautiful thing is that, in this case, we can have our cake and eat it too.
    Vote yes on the h4 ammendment.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Agreed! I posted a thread about this earlier, but didn’t hear of an official solution. I might make a plugin to customize the link output when I have the time–unless someone does it first. 😉

    I’m not entirely familiar with how the id and classes should be set up for these lists but format the example you gave in the first post and I’ll see if I can come up with some hacked code first (for early adopters) and then try my hand at a plugin. marky, you’re more than welcome to continue working on a plugin as well. 🙂

    I have changed my template to use headings instead, so that’s a yes vote from me.
    h2 seems more appropriate to me though, seeing as the menu items are subordinate to the weblog as such (which is denoted by the level 1 heading) rather than a particular day (which is denoted by a level 2 heading). It thus makes more sense to have menu items and days on the same level.
    Using h4 for menu items would imply an adidtional step further down the hiearchy.
    The W3C semantic data extractor is a great help in getting an overview of the structure of a page.
    Either way, you don’t need a hack to change it. The first level menu items are hardcoded into the template, so it’s just a matter of editing your templates.

    Howabout another field in the Add/Edit a Link Category page for “CSS class” that way we can change the class name to whatever? Then it could be called as: <h4 class"$CSSClass">Category Name</h4>
    Good eye, Zach. 🙂

    OK, I’ve just been using WordPress for the first time, working to port over my Blogger blog. So far, things are going OK, until I ran into this problem. I’ve tried changing some of the code, but it didn’t do what I want.
    All I want to do at this point is make the “Links” heading boldface, and probably add a colon at the end so it’s like some of the other headings. Could you please tell me where that’s done? I assume it’s in the links.php file, but I haven’t been able to do what I want there. Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Links List ( a plea for proper category heading ta’ is closed to new replies.