I have create a code to display the events in list format. Everything is working Fine.But it show blank page if there is no data returned. So i want to simply show a message "No Events Found".
<?php
// declaring data
global $post;
$all_events = tribe_get_events(array(
'eventDisplay' => 'upcoming',
'tag' => 'swiss',
'posts_per_page' => 100
));
?>
<!-- fetching events based on upcoming and tags. -->
<?php foreach ($all_events as $post): ?>
<?php setup_postdata($post); ?>
<a href="<?php the_permalink(); ?>">
<div class="col-md-12 event_col">
<div class="col-md-4"><span>- <?php echo tribe_get_start_date($post->ID, false, 'dS M, Y | h:i a'); ?></span></div>
<div class="col-md-4"><span><?php echo tribe_get_venue(); ?></span></div>
<div class="col-md-4"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
</div>
</a>
<?php endforeach; ?>
<?php wp_reset_query(); ?>