• http://www.buffaroll.com

    here is my syntax:
    <?php wp_list_categories('show_count=1&hierarchical=0&title_li=0') ?>

    if i remove the
    show_count=1&

    the categories display fine, I’de like for the count to be displayed next to the category note below it..

    Thanks in advance !

Viewing 2 replies - 1 through 2 (of 2 total)
  • Its likely because you have styled the link of the category as block which then makes the count drop below since its added outside the url.

    • The category name(count)

      The display:block takes whats inside the a tag and make it a block element and since the count is located outside that block it drops below instead. Annoying and I am not sure where in teh code to fix that.

    Found a way to solve this, if you have the same problem as I described above 🙂

    in classes.php find

    $link .= $cat_name . '</a>';

    replace that with:

    $link .= $cat_name . ' (' . intval($category->count) . ')</a>';

    This will make the count show up inside the a tag. You still get the count on a second row though, so we need to remove the original code. Find:

    if ( isset($show_count) && $show_count )
    			$link .= ' (' . intval($category->count) . ')';

    and simply remove it.

    Now things should work for you (fingers crossed)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Category Count is displaying below the Category’ is closed to new replies.