WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] categories and sub categories in sidebar (5 posts)

  1. radrob
    Member
    Posted 8 years ago #

    hi all
    i'm still new to WP and really neewbie in coding, despite that i started organize my first blogpage http://www.radrob.it/blog

    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
    >>architecture
    >offices
    >museum

    >>design
    >industrial
    >product

    any help appreciated

  2. Chris_K
    Member
    Posted 8 years ago #

    Try something like:


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

  3. radrob
    Member
    Posted 8 years ago #

    it works..
    just to refine it

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

    >>architecture(28)
    >offices(6)

    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.

    r.

  4. Chris_K
    Member
    Posted 8 years ago #

    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: http://codex.wordpress.org/Template_Tags/wp_list_cats

    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.

  5. radrob
    Member
    Posted 8 years ago #

    DICE!

    that's what i needed!
    great link

    thx
    r.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.