Show Event Span Multiple Days in Single-event Template.
-
In my custom single-event.php I’m using this code to display the Date and Time of my events:
<?php if(eo_is_all_day()): ?> <!-- Event is all day --> <?php $date_format = 'F j\, Y'; ?> <?php else: ?> <!-- Event is not all day - include time in format --> <?php $date_format = 'F j\, Y \a\t g:ia'; ?> <?php endif; ?>
Then this to show it:
<h3><?php printf(__('%s','eventorganiser'), eo_get_the_start($date_format) );?></h3>
If the event spans multiple days, it doesn’t show the end date (which I’d like to happen). Is there a way to do this without showing the end date on events that are only on one day? I’m assuming this would be part of of a conditional statement. I just don’t know what it is.
Thanks in advance.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Show Event Span Multiple Days in Single-event Template.’ is closed to new replies.