I am having a problem with order of items in the filter for a select custom field.
I created and a select type custom fields and pasted select options in a specific order. But when I see them displayed by the filter in search widget – they have a completely different order. Please see the image attached for better understanding.
The search dropdown will display items in an ascending order
Can I override this? I need them to be in specific order
Unfortunately you will need to edit theme core files to change this.
I don’t mind editing. I just need to know which file to look into. Thanks!
Check theme core files DT >framework >class
File called class_core.php
around line 2249 there’s a line:
// NOW RE-ORDER AND DISPLAY
replace ‘asort’ with any of the php sorting functions
check this URL for references
I changed mine to ‘rsort’ and it did the trick.
Thanks for sharing Alex
You must be logged in to reply to this topic.