Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sort Location Listing by Extra Field Phone Number
// Sort by extra field. e.g "phone".
function wpgmp_sorting_extra_field($sorting,$map) {
$sorting['phone__asc__num'] ="Phone A-Z";
$sorting['phone__desc__num'] ="Phone Z-A";
return $sorting;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment