Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sort Locations Listing by City in Ascending & Decending Order
// Sort by city.
function wpgmp_sorting_location_field($sorting,$map) {
$sorting['city__asc'] ="City A-Z";
$sorting['city__desc'] ="City Z-A";
return $sorting;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment