WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Outputting list_authors without li markup (4 posts)

  1. bruceyeah
    Member
    Posted 8 years ago #

    I need to output a list of blog authors as a comma delimited list...

    eg. "Bob, John, Mary, Jane"

    Problem is... how can I use the list_authors() tag without it printing tags around each value?

    I can't find anything in the documentation about customising the before/after markup of this tag.

    Sorry to rant, but this problem is yet another example of a huge problem I have with WordPress in general.. the arbitrary markup that it produces. Even if I could get this output as a PHP array I could format it exactly as I want to. Anyone worked out a way to 'catch' the output of tags like this so their output can be controlled more easily? This would be an absolute snap to do with MT.

  2. Beel
    Member
    Posted 8 years ago #

    Dang, had to wait for the lame ads to time out before I could read your post. Lag time is annoying.

    If you don't want to style the list so that it displays as you have written, you can certainly hack the function and remove the li's. If you do want the list in other situations, you could also "swipe" the function from template-functions-author and put it in your my-hacks file, edit it and rename to list_authors2()

  3. bruceyeah
    Member
    Posted 8 years ago #

    Thanks.. great idea!

    Yep, those ads are V annoying.. I was trying to fix typos in my post and they weren't showing up.

    I would style the list if possible, but from what I can tell there's absolutely no way to achieve what I want to do with CSS alone - it's a centre aligned inline list seperated by commans - hence the need to change WP's output.

  4. Beel
    Member
    Posted 8 years ago #

    li:after {
    content: ", ";
    }
    li.last:after {
    content: ". ";
    }

    http://www.alistapart.com/articles/taminglists/

Topic Closed

This topic has been closed to new replies.

About this Topic