Support » Themes and Templates » How to show list_categories not as a list

  • Hello,

    I’ve been searching the forum and the codex, but no luck. I’m sorry if I’ve overlooked something.

    How can I get the list_categories to be in a row, and not a list? For an example: Category 1, Category 2, Category 3 etc.

    Any help would be much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • try

     echo strtr(wp_list_categories("echo=0&title_li=''&style=none"),array('<br />'=>''));

    Thanks, this worked really well. I’m actually looking to use it with commas. Any advice or tricks on how to strip the last comma from the list?
    So I don’t have a hanging commas at the end?

    This is what I’m using.

    <?php echo strtr(wp_list_categories("&child_of=5&style=none&echo=0"),array('<br />'=>', '));?>

    This is what I get now:
    Features, Shorts, Interviews,
    Columns, Links,

    How do I create a custom order for list-categories? orderby doesn’t work at all. It still outputs according to id number. What if I want to output like this:

    <?php wp_list_categories(‘orderby=7,1,4,5,6,9,33&include=7,1,4,5,6,9,33&exclude=10&title_li=’ . __(‘The Category List’)); ?>

    As it is, it outputs as: 1,4,5,6,7,9,33, but I want it to output like this:

    7,1,4,5,6,9,33 – NOT 10

    Any suggestions?

    No need to post in multiple threads airbrush, you won’t get a faster reply, the thread you created is sufficient…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to show list_categories not as a list’ is closed to new replies.