FacetWP – merge data from different facets into one

mgibbs189

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

add_filter( ‘facetwp_index_row’, function( $params, $class ) {
if ( in_array( $params[‘facet_name’], [ ‘facet_2’, ‘facet_3’, ‘facet_4’, ‘facet_5’ ] ) ) {
$params[‘facet_name’] = ‘facet_1’;
}

return $params;
}, 10, 2 );
{{/gist}}