Support » Plugins » wp_list_categories children first reverse

  • Hello
    I use this code to show the taxonomies for my posts :

    ——————————————————–
    $taxonomy = ‘My_taxonomy’;
    $terms = wp_get_post_terms($post->ID, $taxonomy, array(“fields” => “ids”));
    if ($terms) {
    echo ‘<ul id=”state_loc”>’;
    $terms = trim(implode(‘,’, (array) $terms), ‘ ,’);
    wp_list_categories(‘title_li=&taxonomy=’ . $taxonomy . ‘&include=’ . $terms);
    echo ‘</ ul >’;
    }
    ———————————————————-

    so it shows like this :
    -Parent1
    –chidlren1
    –chidlren2
    -Parent2
    –chidlren3
    –chidlren4

    There is a way to reverse this list and show childrn first like this ?

    -chidlren1
    -chidlren2
    –Parent1
    -chidlren3
    -chidlren4
    –Parent2

    Thank you

  • The topic ‘wp_list_categories children first reverse’ is closed to new replies.