Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sort Locations Listing by City in Ascending & Decending Order
// Sort by city.
add_filter('wpgmp_sorting','wpgmp_sorting_location_field',2,2);
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