WordPress.org

Ready to get started?Download WordPress

Forums

Indenting category lists, yet again (4 posts)

  1. CurtMonash
    Member
    Posted 8 years ago #

    Hi. I searched and found half a dozen threads on this subject, but none of them are helping me. It's the age-old problem of subcategories not appearing indented in the sidebars. The blog is http://www.dbms2.com The theme is Sharepoint-Like. The WP version is, I think, 1.5.1.3 Based on the old posts I found and the Codex, I've tired many varieties of adding parameters to list_cats (which was what the theme originally used) or wp_list_cats (better order, no other evident effect), but nothing has worked.

    If you look at the page source from the blog, the categories all seem to be showing up at the same level of the list hierarchy, so I doubt CSS is where the problem lies. But I'm open to all suggestions. I realize that there are some known bug issues here, but surely there's a workaround. Not all category lists are unindented, are they??

    Thank you in advance for any help!!

    CAM

  2. skippy
    Member
    Posted 8 years ago #

    wp_list_cats() accepts a hierarchical=1 parameter which is supposed to display children categories as a list inside the current list item. This may very well be a CSS issue.

    First, have you tried the hierarchical option?

    I'm not a CSS guru, so I can't help too much (read: at all!), but that would be the next thing to check.

  3. CurtMonash
    Member
    Posted 8 years ago #

    Arggh!! You're right about the CSS!

    I was misreading the page source. The unindented stuff IS coming out as "children". So surely I need something in the CSS that handles children appropriately.

    Actually, a search on the string "child" in the style sheet turns up NOTHING. So what, I wonder, SHOULD be in there??

    Thanks!!

  4. skippy
    Member
    Posted 8 years ago #

    The term "child" is a logical term used by human beings to describe these categories; it's not a CSS term.

    The child categories are lists inside lists:
    <ul>
    <li>foo</li>
    <li><ul><li>new foo</li>
    <li>more foo</li>
    </ul></li>
    </ul>

    Take a look at the default (Kubrick) theme's stylesheet to see how nested lists are handled there.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags