Viewing 4 replies - 1 through 4 (of 4 total)
  • do you have a sample link for us to see and analyze? also, did you mean events search form at templates/templates/events-search.php ?

    http://wp-events-plugin.com/documentation/using-template-files/

    Thread Starter markboulder

    (@markboulder)

    This is development work for a client, so unfortunately I can’t freely give out the development link (plus it’s currently restricted by ip address). I am referring to events-search.php. I have searched the forums extensively, and the only solution I saw suggested adding a multi-select, or replacing the select with a checkbox group, but I am still not sure how and where I’d modify the corresponding sql statement. The function wp_dropdown_categories could perhaps be replaced with wp_category_checklist but I’m not quite sure how to implement that effectively, and more importantly, what else I’d need to modify in events manager to make it work. From events-search.php:

    <?php if( get_option('dbem_search_form_categories') ): ?>
    		<!-- START Category Search -->
    			<?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', 'name' => 'category', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'selected' => $selected, 'show_option_none' => get_option('dbem_search_form_categories_label'), 'class'=>'em-events-search-category'));
    				EM_Object::ms_global_switch_back(); //if switched above, switch back
    			?>
    		<!-- END Category Search -->
    		<?php endif; ?>

    I really appreciate any ideas on this one. I currently have a number of categories that need to have the capability to be multi-selected and displayed with the search (ie, show all posts that match any of the selected categories).

    agelonwl

    (@angelonwl)

    you need to work on template files events-search.php and events-list.php

    e.g. $args['category'] = $_REQUEST['category'] in events-list.php

    Daedalon

    (@daedalon)

    Markboulder, did you get this done?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Searching Multiple Categories’ is closed to new replies.