Support » Themes and Templates » wp_list_categories() template tags

  • crimson0emperor


    I am outputting a list of categories using wp_list_categories. I want to be able to insert text in-between the category names (like commas), show the number of posts per category, and to edit the title from “Category” into “Posts filed under”.

    I searched in the category.php (in wp-includes) template looking for output text strings or something the like and was unable to find a solution to the problem.

    I got this to work for showing the number of posts:

    <?php wp_list_categories('show_count=' . __ ('1')); ?>

    But when I try to edit the title as well as declare a post count, it doesn’t work. This is my current code:

    <?php wp_list_categories('title_li=' . __('0')), 'show_count=' . __('1'); ?>

    And as far as inserting text in-between categories or commas, I’m totally at a loss.

    Any help would be greatly appreciated. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • crimson0emperor


    Does anybody have any helpful information on this? It would be appreciated.



    ON the page you linked to in the Codex there are at least 3 examples about the showcount:

    wp_list_categories('style=none&show_count=1&title_li=' . __('Posts filed under:') . '' ); ?>

    The style=none portion will remove the li tags = it will NOT be a list anymore, and WP will insert br tags – see the Codex. If you don’t like it, remove the style=none& portion.

    I don’t know how to insert commas…



    Ahh, OK. So I think I’m separating my template tags incorrectly. I am not the most experienced in PHP.

    I’m trying to separate with commas. Am I to do it with ampersands?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_list_categories() template tags’ is closed to new replies.