Second Filter Dropdown
-
Hi guys,
I’ve got 2 parents store categories (Diesel and Loyalty) and each category has a bunch of sub categories. Users will only ever sort by a single category ie. Diesel > Type 1 or Loyalty > Type 3 etc.
I’d like to separate the categories into 2 separate dropdowns though – one for Diesel and its subcategories and one for Loyalty etc – which one the user chooses the use to filter will disregard the other as nothing is selected. Is this achievable? I’ve used your suggestions to set the category dropdown to only show the children etc but not sure how to fire just one dropdown or the other?add_filter( 'wpsl_dropdown_category_args', 'nm_custom_dropdown_category_args' ); function nm_custom_dropdown_category_args( $args ) { if ( is_page( 'diesel' ) ) { $args['parent'] = 6; // parent category ID $args['hierarchical'] = true; // only show the child categories } return $args; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Second Filter Dropdown’ is closed to new replies.