I’m working on a custom post type archive and I want to add an A-Z filtering menu. I managed to pretty much get it working following this thread (Create alphabetical Pagination in wordpress) but I …
Tag: alphabetical
Sort an array of alphabetic and numeric string-type elements ASC, but with numeric elements after alphabetic elements
I have an array of values which are either all-letters or all-numbers and need to sort them in an ascending fashion. Additionally, I want all-numeric values to be moved to the end of the array so that they occur after all of the non-numeric values. If I run sort() on it I get: but I’d like to see: I tried