WordPress.org

Ready to get started?Download WordPress

Forums

How to add the number of post after the the category? (9 posts)

  1. hktvb2001
    Member
    Posted 8 years ago #

    Hello,

    On most theme, it is possible to add a number that count how many post it had in the category. But, I have try to add this number to my theme, which is BLIX, but it seems that it doesn't go right after the category name, but under it.. Does anyone know a way to add it just after the category name on the BLIX theme?

    Thousand thanks!

  2. spencerp
    Member
    Posted 8 years ago #

    Try this:
    <h2>Categories</h2>

      <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>

    or this:
    <h2><?php _e('Categories'); ?></h2>

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

    Found in the sidebar.php file for your theme. Also, this was just discussed in the post after yours, http://wordpress.org/support/topic/51025 but in your case, just reverse the procedure lol.

    spencerp

  3. hktvb2001
    Member
    Posted 8 years ago #

    OK! I try that, but like I said, the number doesn't appear beside the category name, but it appears just down to the category name.. I don't know how to explain.. I am using BLIX theme... Please anyone who use the BLIX theme, or any other who know how to solve my problem, please help!

  4. spencerp
    Member
    Posted 8 years ago #

    I know what you're saying now, I just put that Blix up on my Test Blog and added that code I gave there, it shows it below the Catagory link.. maybe try adjusting it via the css files or something. I'm going to try it once myself...
    Maybe start in this section>

    /* subcontent list
    --------------------------------------------------*/
    #subcontent ul li {
    margin:2px 0 2px 18px;
    padding-bottom:2px;
    border-bottom:1px solid;
    }

    #subcontent li a {
    display:block;
    padding:1px 0;
    height:1%; /* IE WIN */
    }

    #subcontent ul.categories li ul {margin:0;}

    #subcontent ul.categories li li {
    margin:0;
    padding:0 0 3px 0;
    border-bottom:none;
    }

    #subcontent ul.categories li ul ul {margin:0 0 0 16px;}

    spencerp

  5. spencerp
    Member
    Posted 8 years ago #

    Found another post with same issue after Searching...

    http://wordpress.org/support/topic/44921

    display:inline; <-try adding this to: -> #subcontent li a {

    spencerp

    P.S. Worked for me... Mine is like such I believe:
    #subcontent li a {
    display:inline;
    padding:1px 0;
    height:1%; /* IE WIN */
    }

  6. hktvb2001
    Member
    Posted 8 years ago #

    Hey MAN!! You are som great.. Thanks for your help! It was very appreciating..

    Thanks again!! :D

  7. spencerp
    Member
    Posted 8 years ago #

    No problem! =) But really if it wasn't for oMIKEo for placing the fix at the link in my last reply, I might not have gotten it myself lmao! Being that I "suck" at CSS for the most part hahaha.. But glad it's working for ya now... =)

    spencerp

  8. myuption
    Member
    Posted 7 years ago #

    OH, finally i fixed it, thanks :)

  9. tsguitar
    Member
    Posted 7 years ago #

    Can you mark this topic "Resolved"? Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.