Support » Requests and Feedback » How do you display sub categories under their parent?

  • I’d like to have my sub-categories diplayed under their parent. Like this:

    MOVIES
    -Star Wars
    -Batman

    Instead, my categories (sub and parent) and mixed together in alphabetical order. Can Anyone help?

Viewing 7 replies - 1 through 7 (of 7 total)
  • See the “hierarchical” parameter: Template_Tags/wp_list_cats

    There are a lot of helpful people here, but you’re more likely to get help if you give more information. What’s the address of yourblog, for example?

    Ok, I did it. I just added “hierarchical” into my <?php list_cats section. Now… how can I make the parent BOLD? I find that it’s a little “blended in”. Can anyone help me with that?

    Looking at your source code you will have to figure out where the “parents” are in the nested lists hierarchy, and define their style as bold.
    Usually the sidebars are a huge nested list, so you have to look where the parent are:
    #sidebar ul ul li
    or
    #sidebar ul ul ul ul li… – I hope you got the idea.

    Not really sure… here’s my code that matches what you said:

    #sidebar ul ul li:before { content: “0BB 020”; }

    #sidebar ul, #sidebar ul ol {
    margin: 0;
    padding: 0;
    }

    #sidebar ul li {
    list-style-type: none;
    list-style-image: none;
    margin-bottom: 15px;
    }

    #sidebar ul p, #sidebar ul select { margin: 5px 0 8px; }

    #sidebar ul ul, #sidebar ul ol { margin: 5px 0 0 10px; }

    #sidebar ul ul ul, #sidebar ul ol { margin: 0 0 0 10px; }

    ol li, #sidebar ul ol li { list-style: decimal outside; }

    #sidebar ul ul li, #sidebar ul ol li {
    margin: 3px 0 0;
    padding: 0;

    Good, now go to your site and right-click > View Source and patiently count where the parent cats are displayed.
    Is it the first ul li
    or is it in
    ul
    li
    ul
    li etc.
    When you found it, edit your stylesheet.

    Ok, but how exactly do I “define their style as bold.”?
    In other words; what to I type?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do you display sub categories under their parent?’ is closed to new replies.