No, I don’t think that’s actually what he wants. I want the same thing too. I want to be able to retrieve the list of categories as an array so that I can apply an ‘active’ class to the link if I am already in that category.
What I need is the categories as an array. I would rather not have to run my own MySQL query but I think that’s what I’ll have to do.
Why doesn’t the list_cats function call another function that returns an array of categories. Then it could apply all the HTML it wants. The rest of WordPress is so well coded, I was surprised to find this obvious shortcoming.