Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. function index_top_level_terms( $params, $class ) {
  2. if ( 'univers' == $params['facet_name'] ) {
  3. if ( 0 < $params['depth'] ) {
  4. return false; // don't index child terms
  5. }
  6. }
  7.  
  8. if ( 'familles' == $params['facet_name'] ) {
  9. if (( 0 == $params['depth'] ) || ( 2 == $params['depth'] )) {
  10. return false; // index level 2 terms
  11. }
  12. }
  13. return $params;
  14. }
  15. add_filter( 'facetwp_index_row', 'index_top_level_terms', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement