• Hi guys!
    I need to present categories in the sidebar in a hierarchical way. Like this:

    Category 1
    - Sub-category 1
    - Sub-category 2
    
    Category 2
    - Sub-category 3
    - Sub-category 4

    The problem is that only the default theme shows categories like that. All the other themes I have tried show categories in the same level even if they are sub categories. For example:

    Category 1
    Sub-category 1
    Sub-category 2
    Sub-category 3
    Category 2
    Sub-category 4

    How can I make any theme to show categories in a hierarchical way?

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • That template tag has a hierarchical (yes/no) parameter. Use it. Although the default is “yes”.

    style your nested ULs in the sidebar.

    for instance:

    ul, li { margin:0; }
    ul ul, ul ul ul { margin-left: 10px; }

    (or do it with the ‘li’ element instead, up to you ??

    or… you can use the built-in classes

    .children {margin-left: 10px;}

    the children class appears on the UL tag for child categories.

    you probably have a definition which removes all margins from ULs and LIs… but without nesting your definitions, the margins will be removed from all of them (even the children)

    Thread Starter wp-Guy

    (@wp-guy)

    Thank you very much, moshu.
    The parameter hierarchy was set to “0” and I changed it to “1”.

    I thought I took the safer bet, to be honest… since I figured something staring at you saying ‘hierarchical=0’ would tip you off ??

    *giggles*

    I am trying to do the same thing with my categories. Where do I find the parameter hierarchy to change it to 1?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Categories hierachy’ is closed to new replies.