Custom event filter
-
Hi guys,
I can’t run event search filter in a tabbed page in my home page:
here the example
https://www.dayroma.it/wp-content/uploads/2016/03/search.jpg
I set from date and to date, then I click the search button but events list in tabbed page is not refreshed filtered.
I made this custom filter through this code:
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="http://twitter.com/filipstefansson" class="twitter-button">' . $content . '</a>';*/ } add_shortcode('custom_search', 'display_custom_search');If this code is wrong, how can I filter events in my home page?
Thank you everyone
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Custom event filter’ is closed to new replies.