This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Force Uppercase Search

#27276
Ernest MarcinkoErnest Marcinko
Keymaster

That parameter defaults to the get_terms() wordpress internal function – which unfortunately does not support getting the terms hierarchically by default (as far as I know). The orderby=parent will order parent terms to the front, and the rest to the bottom. A similar issue is described here.
As far as I know, the only way to do that is via get_the_term_list()

We have two interal functions, that you can use if you want to achieve that sorting, used as:

$categories = get_terms(array(
 'taxonomy' => 'category'
));
wd_sort_terms_hierarchicaly($categories, $categories_sorted);
wd_flatten_hierarchical_terms($categories_sorted, $categories);
// $categories variable has now the terms sorted by parent/child