• Resolved dunderhonung

    (@dunderhonung)


    I trying to change the terms order. But when I change order in level two all other just messing up. I saw that “term_order” doesen′t look like it should either.

    Im using
    $terms = get_terms( array(
    ‘taxonomy’ => ‘organisationskategori’,
    ‘orderby’ => ‘term_order’,
    ) );

    but the term_order dosent match my settings I have in “Taxonomy order”.

    Is it possible to get it work with multilevel?

    regards,

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Maya

    (@tdgu)

    Hi,
    Actually this should work fine, remember that on each level the term_order index is starting from zero (0).
    So all level 1 terms receive a term_order consecutively, from 0 to up to number of terms on that level. Then each child (and further down the hierarchy) starts again from 0 on each level. This is to set a precise position on a level list, instead receive non-consecutive indexes.

    Now, to make a output, you should create a loop which parse down the hierarchy and output the data, just like WordPress walker classes does https://codex.www.ads-software.com/Class_Reference/Walker Or build your own method and include ‘child_of’ within get_terms arguments.

    Thanks

    Thread Starter dunderhonung

    (@dunderhonung)

    Oki, I see.

    I think I will solve it by using multiple for each

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Term order dose′t work with multilevel’ is closed to new replies.