facetwp index taxonomy name instead of slug

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
/**
* reindex after adding or updating this filter
*/
add_filter( ‘facetwp_index_row’, function( $params, $class ) {
if ( ‘my_facet’ == $params[‘facet_name’] ) { // change my_facet to name of your facet
$params[‘facet_value’] = $params[‘facet_display_value’];
}
return $params;
}, 10, 2 );
{{/gist}}