Support » How-To and Troubleshooting » (wp_)list_cats children not indented

(wp_)list_cats children not indented

  • Pardon the repost of this question, but since I corrected my last post twice, it took the post count to 3, and I was afraid the question would get overlooked for appearing to have been answered…

    Sorry to be a bother, but I have tried just about every combination of variables for both list_cats and wp_list_cats, but cannot for the life of me get the children to show up as indented, hierarchically. Is it a matter of whether you use the unordered list option? I’ve tried that both ways…:
    This way, hoping that the defaults would work:
    <?php wp_list_cats(‘sort_column=name&optioncount=1’); ?>
    This way, because they didn’t
    <?php wp_list_cats(‘sort_column=name&optioncount=1&children=1&hierarchical=1’); ?>
    And adding, subtracting and changing other variables like list, hide_empty and sort_column in the hopes that the answer to my problem was a simple yet unknown incompatability in my particular combination of variables…

    I am using the most recent build (having updated, hoping that perhaps that would fix the problem).

    I would be sooo grateful for any help I can get.

Viewing 1 replies (of 1 total)
  • 1.5, you say.

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

    should work. See http://codex.wordpress.org/Template_Tags/wp_list_cats

    It might be a problem with your CSS. Go to your site and view the source code your browser sees. Are there nested lists like the one below?

    <li>cat 1
    <li>cat 1.a</li>
    <li>cat 2</li>

    It may not look as pretty: it’s only the order of the tags that’s important, not spaces and new lines. If it does look like the above, the problem comes from your CSS.

Viewing 1 replies (of 1 total)
  • The topic ‘(wp_)list_cats children not indented’ is closed to new replies.