Multi-Category Search
-
Hey there guys!
Just trying to figure this out – is there a way to have more that one category box to search from? A lot of my events have two or three categories they fall under and I would love to be able to filter them. I tried just duplicating the category box a few times and then filtering a la
<?php $selected = !empty($_REQUEST['category']) ? $_REQUEST['category'] : 0; EM_Object::ms_global_switch(); //in case in global tables mode of MultiSite, grabs main site categories, if not using MS Global, nothing happens wp_dropdown_categories(array( 'hide_empty' => 0, 'orderby' =>'name', 'exclude_tree' => '1407, 1412, 35', 'name' => 'category', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'show_option_none' => get_option('dbem_search_form_categories_label'), 'class'=>'em-events-search-category boxit')); EM_Object::ms_global_switch_back(); //if switched above, switch back ?> <?php $selected = !empty($_REQUEST['category']) ? $_REQUEST['category'] : 0; EM_Object::ms_global_switch(); //in case in global tables mode of MultiSite, grabs main site categories, if not using MS Global, nothing happens wp_dropdown_categories(array( 'hide_empty' => 0, 'orderby' =>'name', 'exclude_tree' => '1403, 1412, 35', 'name' => 'category', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'show_option_none' => get_option('dbem_search_form_categories_label'), 'class'=>'em-events-search-category boxit')); EM_Object::ms_global_switch_back(); //if switched above, switch back ?> <?php $selected = !empty($_REQUEST['category']) ? $_REQUEST['category'] : 0; EM_Object::ms_global_switch(); //in case in global tables mode of MultiSite, grabs main site categories, if not using MS Global, nothing happens wp_dropdown_categories(array( 'hide_empty' => 0, 'orderby' =>'name', 'exclude_tree' => '1403, 1407, 35', 'name' => 'category', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'show_option_none' => get_option('dbem_search_form_categories_label'), 'class'=>'em-events-search-category boxit')); EM_Object::ms_global_switch_back(); //if switched above, switch back ?>
but then the search breaks. Help would be great! Thanks.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Multi-Category Search’ is closed to new replies.