Support » Fixing WordPress » Add class to list-items in link-list

  • I could be dense in what variable I’m supposed to be changing here.
    I went into my Links Manager and edited the Links Category information for my “Blogroll” category on one of my sites in the hopes of putting a class inside the li tag. [I’m trying to hack in the class so I can run a collapsible list script.]
    I edited the before part of the listing under Text/HTML, but when I view source, I see no change for that category.
    Is it because I’m using <?php get_links_list() ?> to pull my links out of the database?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Isn’t this a function of CSS inside a style sheet and not in the WP GUI? Maybe I’m not understanding what you are doing, Geof. Heck, I don’t understand what *I* am doing half the time! 🙂

    Go in to Manage Links, then Manage Link Categories. I’m editing the “before” under Text/HTML.

    Aaaaah! Okay, now I see. Okay, now the next point…you are trying to add a class to the < li > element? Is that right? As in a CSS class?

    You want to use a show/hide script for your links?

    Yes, ma’am. 🙂

    It’s okay Craig, I happened to know what he was talking about as I had just helped someone with this. 🙂

    I think I see what you’re suggesting; my present migraine is telling me to look at it later, like after the bustle of Christmas. 🙂

    I don’t know exactly what you’re trying to do in script (sg sounds like she’s on it!), but my typical approach on the other end would be to revise the get_links_ functions to actually take an optional class parameter, and if the parameter is non-empty, tack a class=’$param’ into the forming of the opening li construct.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add class to list-items in link-list’ is closed to new replies.