• Hi everyone,
    I have three tab in my home page where I use three filters for today, tomorrow and one date events respectively.

    For the first two tabs I’m able to obtain a list of events with pagination which returns my results directly in the tab because I pass ajax = 1 in shortcode [events_list].

    For the third tab instead (one in which you can filter events by date,location, etc.) the button that triggers the search does not work.

    You can see it in https://www.dayroma.it

    Here below the shortcode that invokes the custom research, but does not work .

    function display_custom_search( $attr, $content = null ) {
    
    	$search_args = em_get_search_form_defaults();
    	em_locate_template('templates/events-search.php', true, array('args'=>$search_args));
    
    	$args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit');
    						if( !empty($args['ajax']) ){ echo '<div class="em-search-ajax">'; } //AJAX wrapper open
    						if( get_option('dbem_event_list_groupby') ){
    							em_locate_template('templates/events-list-grouped.php', true, array('args'=>$args));
    						}else{
    							em_locate_template('templates/events-list.php', true, array('args'=>$args));
    						}
    						if( !empty($args['ajax']) ) echo "</div>"; //AJAX wrapper close
    
        /*return '<a href="https://twitter.com/filipstefansson" class="twitter-button">' . $content . '</a>';*/
    }
    add_shortcode('custom_search', 'display_custom_search');

    Thanks for your help

    https://www.ads-software.com/plugins/events-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom search not working’ is closed to new replies.