Support » Themes and Templates » categories and sub categories in sidebar

  • Resolved radrob


    hi all
    i’m still new to WP and really neewbie in coding, despite that i started organize my first blogpage

    my big request and need it’s to “organize” the categories on my sidebar, my wish it’s showin main categories and sub categories right down the main ones ..instead of mixed all toghether..

    just like


    any help appreciated

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try something like:

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

    it works..
    just to refine it

    -what i must add for see the resume of post per cat


    and it’s possible to get main cat in bold
    and sub-cat in plain
    or have some little typo that differentiate main from sub

    ..i’m feeling really dumb
    but i started reading php last night

    i thank you so much
    all helps are really precious.


    well, to start with.. change “optioncount=0” to “optioncount=1” in what I posted earlier.

    To get a better feel for what you can do with wp_list_cats, check out the codex:

    For your formatting bits, you want to find some themes that do something like that and study their CSS… look at what classes they use and have a look at the .css file(s), for instance.


    that’s what i needed!
    great link


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘categories and sub categories in sidebar’ is closed to new replies.