Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Force Uppercase Search › Reply To: Force Uppercase Search
May 12, 2020 at 3:45 pm
#27276
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