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

Reply To: Trying to find a taxonomy term leading character between 9 and A.

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Trying to find a taxonomy term leading character between 9 and A. Reply To: Trying to find a taxonomy term leading character between 9 and A.

#21690
Ernest MarcinkoErnest Marcinko
Keymaster

Hi!

The problem is, that the taxonomy term order is is actually requested from WordPress via the get_terms(..) call. This function accepts the following ordering ‘name’, ‘slug’, ‘term_group’, ‘term_id’, ‘id’, ‘description’, ‘parent’ & ‘count’
Unfortunately the taxonomy name and slug are always considered as string based fields, and there is no option in the arguments list to typecast the name to integer values. That would not help either, as the other items would preceed the simple numerical names. So modifying the arguments in this call will not help.

Any special character, like ‘.’ dot or ‘_’ underscore are considere before the ‘0’ due to their order, but I think using a leading 0 is probably the best option here visually. I’m not sure if there is any other way.