Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Yes, but you’d need to do some custom coding. This should help:

    http://pastebin.com/V96b5RN9

    Thread Starter ulir

    (@ulir)

    He again,

    thank you for the link. I actually found that one before but I am unsure if the code is still valid?
    The description says:

    INSERT THIS SNIPPET
    <?php
    $selected = !empty($_REQUEST['search-tag']) ? $_REQUEST['search-tag'] : 0;
    wp_dropdown_categories(array( 'hide_empty' => 0, 'name' => 'search-tag', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_TAG, 'selected' => $selected, 'show_option_none' => 'All Tags', 'class'=>'em-events-search-tag', 'orderby' =>'name'));
    ?>
    
    BELOW
                    <?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; ?>

    … but I can’t find the code
    <?php if( get_option('dbem_search_form_categories') ): ?>
    anywhere in the events-search.php

    Try this…
    In file events-search.php
    About line #17.. after
    <div class="em-search-main">

    Put the code… (will appear above most items in the search box).

    <?php do_action('em_template_events_search_form_header'); //hook in here to add extra fields, text etc. ?>
                                              <?php
                                                $selected = !empty($_REQUEST['search-tag']) ? $_REQUEST['search-tag'] : 0;
                                                wp_dropdown_categories(array( 'hide_empty' => 0, 'name' => 'search-tag', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_TAG, 'selected' => $selected, 'show_option_none' => 'All Tags', 'class'=>'em-events-search-tag', 'orderby' =>'name'));
                                                ?>
                                               <br />

    Then in events-list.php
    About line #13…
    After…
    if( get_option('dbem_css_evlist') ) echo "<div class='css-events-list'>";

    Put the code…

    if ( $_REQUEST['search-tag'] != '-1' ){
     		$args['tag'] = $_REQUEST['search-tag'];
    	}

    ALWAYS BACK UP YOUR FILES AND DATABASES.. and know how to FTP to your website

    The code worked for me ! The only thing is the,
    search “date” must be, before what you are looking for.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry but can I know what do you mean by this ?

    The only thing is the, search “date” must be, before what you are looking for.

    For my installation…

    If an event is in the past.. and you are looking for it.. you have to set the “Start” date to include that event.

    Otherwise it is only searches for future events…

    In my Settings->Pages->Event List/Archives…
    Enable Archives is “Yes”
    Event archives scope is “All Events”
    Event list scope is “All Events”
    Are current events past events “Yes”

    The only thing is the,
    search "date" must be, before what you are looking for.

    Even with my settings I mention above… I have to set the Start date “back” to include a past Event..

    I actually didn’t think, and from what I read in previous supports… that’s not the way it should be…

    But that’s how it is for me…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add Tags to Search Form’ is closed to new replies.