Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function index_top_level_terms( $params, $class ) {
- if ( 'univers' == $params['facet_name'] ) {
- if ( 0 < $params['depth'] ) {
- return false; // don't index child terms
- }
- }
- if ( 'familles' == $params['facet_name'] ) {
- if (( 0 == $params['depth'] ) || ( 2 == $params['depth'] )) {
- return false; // index level 2 terms
- }
- }
- return $params;
- }
- add_filter( 'facetwp_index_row', 'index_top_level_terms', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement