php list_cat problem (6 posts)

  1. sskhalsa
    Posted 11 years ago #

    on my sidebar i am using the following code for the category list:

    <?php list_cats(1, 'All', 'name', 'asc', '',1,0,1,1); ?>

    I think its right; all I really want to do is have my category list show the number of posts in each category. I have gotten the # of posts to show up, but they come on a second line beneath the category. Any fixes?

    go to http://www.sskhalsa.com if u wanna see the problem in action

  2. Lorelle
    Posted 11 years ago #

    Try this, if all you want is the show the number of posts:

    <?php wp_list_cats('optioncount=1'); ?>

    And if they show up on the next line, consider making your sidebar wider or whatever wider that is causing your lines to wrap. There is no code to force the line break. Something is too narrow there.


  3. Joshua Sigar
    Posted 11 years ago #

    Actually, it's more of CSS issue.

    In your CSS file, you have the following.
    #sidebar ul li ul li a{
    display: block;
    height:1%; /* IE WIN */

    If you delete the display: block; you should have the category name and category count on the same line.

  4. sskhalsa
    Posted 11 years ago #


    you guysss areee crazzzy lol

    thanks alot man alphaoide...it worked perfect

    mad pimp support here

  5. imperialman
    Posted 11 years ago #

    Deleting display: block; only fixed this problem in Firefox for me -- but not Internet Explorer. Does anyone know why IE would look different?

    It looks pretty shoddy to have the post count on the second line... See http://www.baerguide.com. Any help would be appreciated!

  6. Kafkaesqui

    Posted 11 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic