• Hi to all!

    I want to show number of posts of each category in my menu. I’m using a drop down menu but I want to show number of posts only for subcategories, while next to parent category I don’t want to show number of posts. How to remove show_count only from parent category?

    And I want to customize a little bit this number. Currently, it’s displaying as (number) but I want to display it as <span>number</span>. I tried this code:

    <?php
    $categoryshow = wp_list_categories('sort_column=name&sort_order=asc&style=list&show_count=1&children=true&hierarchical=true&title_li=0');
    $categoryshow = str_replace( '(', '<span>', $categoryshow);
    $categoryshow = str_replace( ')', '</span>', $categoryshow);
    ech

    but it doesn’t work. There are still ( and ) and no <span> or </span>. Why??

    Thank you in advance!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Help with show_count’ is closed to new replies.