FacetWP – correct facet_value of a number-based taxonomy term

mgibbs189

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

add_filter( ‘facetwp_index_row’, function( $params, $class ) {
if ( ‘weight’ == $params[‘facet_name’] ) {
$params[‘facet_value’] = str_replace( ‘-‘, ‘.’, $params[‘facet_value’] );
}
return $params;
}, 10, 2 );
{{/gist}}