• Hi,

    I’m just customising the templates and I’ve made a horizontal list of categories. Each category has a category count in brackets next to it. Fairly simple, However….

    I wanted to make each item a “button” as such by changing the styling to span the whole column and add in top and bottom padding. I then set the list “li a” style to “display: block” to make it all clickable as a link (not just the text).

    The only trouble with this is that because the list count (in brackets) does not appear to be included in the list element

    • it throws this onto the next line and outside the “button” effect I’m aiming for.

      What I’m trying to do is do find a way to place the count (1) inside the list element so that it all displays on one line.

      Hope that makes sense and hope someone can help me out there. It seems strange that’s its generated outside the list in the first place.

      Many thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • anyone figure this out yet ? I have 10,000 for the person who does

    There you go! I prefer cash. 😉

    I found a workable solution in classes.php

    if ( isset($show_count) && $show_count )
    $link .= ‘<span>(‘ . intval($category->category_count) . ‘)</span>’;

    this puts a < span > tag around the count then for CSS i used this

    position: relative;
    float: right;
    top: ;
    left: ;

    I liked my suggestion better so guess that awards me the 10,000 :))

    I guess, it depends on if you like to have the number in the link or not. But your idea is certainly worth 1/10 of that reward :D.

    gspark, I think i need your help with this…I’ve tried these instructions, and yours but i cant get the post counts to display next to the category, instead they display below the category…

    your instructions are kind of difficult to follow, where should I put that script you suggested, and what should I name the element in my CSS class that should feature those characteristics?

    Hi, I would like to show the count of only the current category being displayed in the category archive listing. How to do this without mucking about with WordPress code which will get rewritten next time there’s an update?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Category Count INSIDE Category List?’ is closed to new replies.