• rndpkt

    (@rndpkt)


    Maybe I’m just missing something reading through the code, but is there a way to cause the list_cats function to output the list of categories in a nested, list based on their parent-child relationships? I tried changing some of the function parameters with no success and I can’t find anything in the forums about it. Anyone? Thanks in advance!

Viewing 15 replies - 1 through 15 (of 18 total)
  • Kafkaesqui

    (@kafkaesqui)

    The default _is_ to list categories in parent-child hierarchical nested list (there is a ‘hierarchical’ parameter in list_cats() and wp_list_cats(), but either it or the ‘list’ parameter must be specifically set to false/off.

    If you’re not seeing this, it’s possible the menu/sidebar ul and li tag properties in your stylesheet are overriding how it’s displayed.

    theboywonder

    (@theboywonder)

    theboywonder

    (@theboywonder)

    Woh, you can’t edit posts anymore :/

    What are the arguments at current for your list_cats function?

    indi

    (@indi)

    wp_list_cats isn’t displaying a hierarchy for me (on 1.5). It’s not the CSS because I’ve viewed the source and its not producing the HTML for a nested list at all.

    I’ve also replicated the error on multiple themes.

    Any clues?

    Thread Starter rndpkt

    (@rndpkt)

    I’m using the base stuff from the ‘nolimits’ theme. The PHP call is:

    <?php list_cats(0, ”, ‘name’, ‘ASC’, ‘/’, true, 0, 1); ?>

    My HTML output is:

    <h2>Categories:</h2>

    Teas, Wines should be sub-lists under Beverages.

    Thread Starter rndpkt

    (@rndpkt)

    Doh!!


    <h2>Categories:</h2>

    Thread Starter rndpkt

    (@rndpkt)

    Hmmmm….

    <h2>Categories:</h2>

    Thread Starter rndpkt

    (@rndpkt)

    <h2> Categories:</h2>

    Thread Starter rndpkt

    (@rndpkt)

    {h2}Categories:{/h2}
    {ul}
    {li}{a href=”https://www.devrandom.org/?cat=2&#8243; title=”View all posts filed under Technology”>Technology{/a> (2){/li}
    {li}{a href=”https://www.devrandom.org/?cat=8&#8243; title=”View all posts filed under Beverages”>Beverages{/a> (1){/li}
    {li}{a href=”https://www.devrandom.org/?cat=9&#8243; title=”View all posts filed under Wines”>Wines{/a> (1){/li}
    {li}{a href=”https://www.devrandom.org/?cat=10&#8243; title=”View all posts filed under Teas”>Teas{/a> (1){/li}
    {/ul}

    Thread Starter rndpkt

    (@rndpkt)

    That’s what my code snippet prints out. Sorry for the multi-paste erors.

    Root

    (@root)

    Presumably we arent going to get nested lists with an h2 tag in there ?

    chuckblue

    (@chuckblue)

    I have the same problem under 1.5

    sub-categories listing as separate categories.

    timothyb

    (@timothyb)

    ME too!!! is this something as a bug under 1.5?

    I have <?php wp_list_cats(“sort_column=name&showempty=1&optioncount=1”); ?> and it won’t do anything but list all my categories and subcategories in non-alphabetical order. =(

    chuckblue

    (@chuckblue)

    my wp_list_cats has no options. I’m using the Aesthetic theme. I emailed the theme maker, but no response from 3 days ago, must be busy. Or its a 1.5 thing.

    chuckblue

    (@chuckblue)

    hrm, edit is off.

    I did check a 1.2.2 blog I use, and it has no options either. Yet it displays the subs under the parent category.

    So it must be a change in 1.5

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘list_cats Display in Nested List’ is closed to new replies.