WordPress.org

Ready to get started?Download WordPress

Forums

Numbers behind categories links (15 posts)

  1. StookerT
    Member
    Posted 8 years ago #

    Hi,

    I see that some skins have numbers behind the categories, I got the RIN skin and that one doesn't have this standard. Does anybody know how to put this in?

    Greetz all !

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

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

    Try that ?

  3. StookerT
    Member
    Posted 8 years ago #

    uhm....can I just put it in the sidebar.php after the cat link ?
    It looks like this then:

    <h2><?php _e('Categories'); ?></h2>
    <?php list_cats('sort_column=name&optioncount=1');?>

    But it doesn't give me the numbers after the categories, look http://www.stooker-web.nl

    Maybe I got it at the wrong place?

  4. StookerT
    Member
    Posted 8 years ago #

    I got it with numbers now, took a line of code from another theme.....but the numbers are below the categories instead of after the categorie name.

    I'm using this line now:

    <h2><?php _e('Categories:'); ?></h2>
    <?php list_cats(FALSE, '', 'name', '', FALSE, TRUE, FALSE, TRUE); ?>

    And the menu looks like this:
    Digitall corner
    (3)
    Maak’em of Kraak’em
    (2)
    Opmerkelijk nieuws
    (4)
    Overig
    (5)
    Party
    (3)
    Sport
    (3)

    Instead of this:
    Digitall corner (3)
    Maak’em of Kraak’em (2)
    Opmerkelijk nieuws (4)
    Overig (5)
    Party (3)
    Sport (3)

  5. tasari
    Member
    Posted 8 years ago #

    Use this :
    <h2><?php _e('Categories:'); ?>
    <?php list_cats(FALSE, '', 'name', '', FALSE, TRUE, FALSE, TRUE); ?></h2>

  6. Joshua Sigar
    Member
    Posted 8 years ago #

    It's because of the CSS style in effect for the categories list. The CSS is necessary for the fixed-width highlite that you get when you hover on it.

    To modify it, find the following in the CSS file and just delete the whole thing.
    #sidebar ul li ul li a{
    display: block;
    height:1%; /* IE WIN */
    }

  7. tasari
    Member
    Posted 8 years ago #

    Don't use my post ! I was too quick.. Read post just before this one :-)
    That's the problem !

  8. StookerT
    Member
    Posted 8 years ago #

    Yeah Thanks for the solution !!
    Got the monthly archives included also know, with numbers.

    There's only one thing left. Every link, categorie or archive in the sidebar has an icon before it, except for the user counter. I think that <li > or < ul> things arrange that, but I used the same code as with the other links.

    This is the code from the Statistics (User(s) Online) and the Links bar, both used same code, but the links have icons before it and the user online doesn't have it.

    http://www.stooker-web.nl/wp-content/code.jpg

  9. roterhund
    Member
    Posted 8 years ago #

    StookerT,
    try to put the users online in a li, not directly in the ul.

  10. StookerT
    Member
    Posted 8 years ago #

    When I do that, only thing changes is that the white block is gone, but still no icon.

  11. roterhund
    Member
    Posted 8 years ago #

    Hi StookerT, try checking your code with the w3-validator: http://validator.w3.org/
    Looks like you messed up your ul/li-structure. You can't, for instance, put content directly in the ul. Good luck!

  12. StookerT
    Member
    Posted 8 years ago #

    Thanks for the tip, at first got like 12 or 15 errors....after some help here I only got 3 :-)

  13. roterhund
    Member
    Posted 8 years ago #

    Way to go! And I see you got the users-online-icon to show, too. :-)

  14. StookerT
    Member
    Posted 8 years ago #

    Yeah, just needed an extra nested < li > </ li> there and that was also solved :-)

  15. TdeL
    Member
    Posted 8 years ago #

    This wil put the amount of posts behind the categorie links in the sidebar:

    <h2><?php _e('Categorie'); ?></h2>
    <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>

    Got the code standard with the angel theme.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.