mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

// PUT THIS IN YOUR THEME’S FUNCTIONS.PHP
// Replace “my_facet” with your actual facet name

function facet_custom_sort( $orderby, $facet ) {
if ( ‘my_facet’ == $facet[‘name’] ) {
$orderby = ‘FIELD(f.facet_display_value, “Under $50”, “$50 – $75”, “$75 – $100”, “Over $100”)’;
}
return $orderby;
}
add_filter( ‘facetwp_facet_orderby’, ‘facet_custom_sort’, 10, 2 );
{{/gist}}