The function that outputs the event list is EM_Events::output defined in wp-content/plugins/events-manager/classes/em-events.php
You’ll see the following code:
if ( $events_count > 0 ) {
...
}elseif( $args['no_results_msg'] !== false ){
$output = !empty($args['no_results_msg']) ? $args['no_results_msg'] : get_option('dbem_no_events_message');
}
...
$output = apply_filters('em_events_output', $output, $events, $args);
return $output;
There is no placeholder like {has_event}
You could use the ’em_events_output’ filter to override the output in the case when there were no events.
You could also suppress the message using the no_results_msg setting in the shortcode:
[events_list no_results_msg=" "]
Or you could specify the following shortcode:
[events_list no_results_msg='<div class="no-results-msg"></div>']
And then add the following css:
.no-results-msg {
display: none;
}
-
This reply was modified 1 year, 9 months ago by
joneiseman.