Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Last active June 17, 2020 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgibbs189/ee7f3992e7da39653322c8ed08beade3 to your computer and use it in GitHub Desktop.
Save mgibbs189/ee7f3992e7da39653322c8ed08beade3 to your computer and use it in GitHub Desktop.
FacetWP - merge data from different facets into one
<?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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment