WordPress.org

Ready to get started?Download WordPress

Forums

(wp_)list_cats children not indented (9 posts)

  1. justkristin
    Member
    Posted 9 years ago #

    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.

  2. justkristin
    Member
    Posted 9 years ago #


  3. justkristin
    Member
    Posted 9 years ago #


  4. navid
    Member
    Posted 9 years ago #

    Hey Kristin,

    I am on the 01/31/05 nightly and it is being indented for me (http://www.navidazimi.com/archive/). But then again I am using the wp-exec plugin as a wrapper for wp_list_cats.

    But try this:

    <?php wp_list_cats(); ?>

    This will take all the default variables... which includes indenting children. Let me know if that works. Thanks.

    Navid.

  5. justkristin
    Member
    Posted 9 years ago #

    Wow, Navid, thanks! I tried it and it half works:
    Now the parents are indented and the children "outdented" -
    the opposite of the outline-like structure it should be.
    Do I need to use the wrapper, too?
    Any ideas? Want a screen capture? Thank you again...

  6. justkristin
    Member
    Posted 9 years ago #

    Oh, and the half-working version is in IE, while FireFox has consistantly shown them as a straight, indentless list. It shows yours prettily enough, though. I just tried your plugin, but am having no luck there, either. What a problem child I am. :)

  7. navid
    Member
    Posted 9 years ago #

    A screen capture and/or a link would be ideal. But in the meantime, and I should have said this earlier... are you enclosing it in <ul>?

    As in:

    <ul>
    <?php wp_list_cats(); ?>
    </ul>

    If you're using my wp-exec plugin in a post or page (not inside a .php) you would include the following line:

    <ul>
    <exec type="categories" />
    </ul>

  8. justkristin
    Member
    Posted 9 years ago #

    To anyone who is reading this, Navid is tremendously helpful and patient. :) Thank you, Navid. In a moment of rare clarity however, I figured out my own problem, and resolve hereforth to always check my css file before posting questions that may even remotely have anything to do with style.... :)

  9. navid
    Member
    Posted 9 years ago #

    Haha. Oh Kristin, whenever these sort of things happen to me I just calmly repeat "at least its working now. at least its working now." And trust me, they happen more often then I'd like to admit.

    I am glad it works! And thanks for the kind comments =)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.