Plugin: Events Manager – Search by start date only

I solved this. First add

$args['scope'] = $_REQUEST['scope'][0]; 

to the events-list.php under the line:

 em_locate_template('templates/events-search.php',true);

This will stop the search from finding a date range and only search single dates. Then in events-search.php, remove the second box for end-date.

then in events manager plugin folder “classes” file em-events.php

This is what it should look like from line 196. Please note, I got rid of the extra spaces between lines so my line 196 may not be the same as yours.. do a search for “if ( $events_count > 0 )” and that is the line I’ll start from:

        if ( $events_count > 0 ) {

        foreach ( $events as $EM_Event ) {
            if ( !$args['scope'] || ( $args['scope'] == $EM_Event->event_start_date ) ) { 
                $output .= $EM_Event->output($format);
                $stop_now = false;
            }
            else {
                $output = get_option ( 'dbem_no_events_message' );              
                $stop_now = true; // so that we don't add a header and footer if there are no events displayed          
            }
        }

        if ( !$stop_now ) { // if there are events to display
            //Add headers and footers to output
            if( $format == get_option ( 'dbem_event_list_item_format' ) ){
                $format_header = ( get_option( 'dbem_event_list_item_format_header') == '' ) ? '':get_option ( 'dbem_event_list_item_format_header' );
                $format_footer = ( get_option ( 'dbem_event_list_item_format_footer' ) == '' ) ? '':get_option ( 'dbem_event_list_item_format_footer' );
            }else{
                $format_header = ( !empty($args['format_header']) ) ? $args['format_header']:'';
                $format_footer = ( !empty($args['format_footer']) ) ? $args['format_footer']:'';
            }   
            $output = $format_header .  $output . $format_footer;       
        }