• Title says it all. I currently use

    wp_list_categories('title_li=&style=none');

    which gives me the category list as a link (perfect) but each one is followed by a BR, which I do not want.

    How do I format the call so that each category is returned as link with a single space between each one?

    In other words, instead of this

    <a ...>Cat 1</a><br />
    <a ...>Cat 2</a><br />

    I get this

    <a ...>Cat 1</a> <a ...>Cat 2</a>

    …Mike

Viewing 1 replies (of 1 total)
  • Thread Starter gendem

    (@gendem)

    To answer my opwn question, do it like this:

    <?php echo str_replace('<br />',' ', wp_list_categories('echo=0&style=&title_li='));?>

    …Mike

Viewing 1 replies (of 1 total)
  • The topic ‘How to strip all formatting from wp_get_categories(), including trailng <br>’ is closed to new replies.