WordPress.org

Ready to get started?Download WordPress

Forums

How do you display sub categories under their parent? (8 posts)

  1. flexmentalloishere
    Member
    Posted 8 years ago #

    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?

  2. moshu
    Member
    Posted 8 years ago #

    See the "hierarchical" parameter: Template_Tags/wp_list_cats

  3. Bodhipaksa
    Member
    Posted 8 years ago #

    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?

  4. flexmentalloishere
    Member
    Posted 8 years ago #

    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?

  5. moshu
    Member
    Posted 8 years ago #

    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.

  6. flexmentalloishere
    Member
    Posted 8 years ago #

    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;

  7. moshu
    Member
    Posted 8 years ago #

    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.

  8. flexmentalloishere
    Member
    Posted 8 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.