Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sort Posts Listing below google maps using custom field
// Sort by custom field. e.g "salary".
function wpgmp_sorting_custom_field($sorting,$map) {
$sorting['%salary%__asc__num'] ="Salary Low-High";
$sorting['%salary%__desc__num'] ="Salary High-Low";
return $sorting;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment