Shortcode for events spanning multiple days that are all-day
Hi, I need help writing a shortcode combination. I would like to display events that span multiple days (I would like it to show the start and end dates only, if the events are listed as all-day events, and not display the start/end times. However, if the multi-day event has a specific start/end time, I would like to display it.
For example, for a event with no start and end time, I would like it to display as:
January 2, 2014 – January 5, 2014.
But for an event WITH start/end times, I would like it to display as:
February 2, 2014, 7:00 am – February 6, 2014, 9:00 pm
I made up this shortcode, but it isn’t working:
[if-multi-day]<div>[start-date][if-not-all-day], [start-time][/if-not-all-day] – [end-date][if-not-all-day], [end-time][/if-not-all-day]</div>[/if-multi-day]
What have I done wrong?
- The topic ‘Shortcode for events spanning multiple days that are all-day’ is closed to new replies.