Remove specific categories from drop down menu in search
-
Hi,
I am using the events search, though I am trying to customise the options on the drop-down for the categories. I was looking to exclude 4 out of the 6 categories currently on my site, so that you only have the option to select 2 categories, instead of 6.
I have tried excluding the 4 categories I do not wish to show, with no luck.
Code below
<fieldset> <div class="label">Sector</div> <?php if( !empty($search_categories) || (get_option('dbem_search_form_categories') && empty($search_categories)) ): ?> <!-- START Category Search --> <select name="category" class="em-events-search-category"> <option value=''><?php echo get_option('dbem_search_form_categories_label') ?></option> <?php foreach(EM_Categories::get(array('orderby'=>'category_name&exclude=11,12,13,14')) as $EM_Category): ?> <option value="<?php echo $EM_Category->id; ?>" <?php echo (!empty($_REQUEST['category']) && $_REQUEST['category'] == $EM_Category->id) ? 'selected="selected"':''; ?>><?php echo $EM_Category->name; ?></option> <?php endforeach; ?> </select> <a>/events/categories/" class="helpicon" title="Click here for more info on skill levels"></a> <!-- END Category Search --> <?php endif; ?> </fieldset>
code end
[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
I was also wondering if you could customise the search event form to add a list of events, instead of the default options available.
Thanks in advance for any help.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Remove specific categories from drop down menu in search’ is closed to new replies.