Combine two facets’ data source into one facet

mgibbs189

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

/**
* This will trick FacetWP’s indexer into indexing “tags_list” values for the “categories_new” facet
*
* Re-index after adding the following code into your (child) theme’s functions.php
*/
add_filter( ‘facetwp_index_row’, function( $params, $class ) {
if ( ‘tags_list’ == $params[‘facet_name’] ) {
$params[‘facet_name’] = ‘categories_new’;
}
return $params;
}, 99, 2 );

{{/gist}}