我解决了这个问题。首次添加
$args[\'scope\'] = $_REQUEST[\'scope\'][0];
到事件列表。php下线:
em_locate_template(\'templates/events-search.php\',true);
这将阻止搜索查找日期范围,而只搜索单个日期。然后在事件搜索中。php,删除结束日期的第二个框。
然后在events manager插件文件夹“classes”文件em events中。php
这是196行的样子。请注意,我去掉了两行之间多余的空格,所以我的196行可能与你的不一样。。搜索“if($events\\u count>0)”,我将从这行开始:
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;
}