Hi Julie,
So if I understand you correctly you want to be able to format the date differently depending on whether the event is recurring or not? Unfortunately that’s not possible using placeholders, you can however, ditch the placeholders and edit the template shortcode-event-list.php
template file instead.
That does require at least some familiarity with php, but it does give you complete flexibility. In that template file you can do something like eo_reoccurs()
(see codex: http://codex.wp-event-organiser.com/function-eo_reoccurs.html).
You may want to keep an eye out for 3.0.0 when its released later this year as it introduces a new function: eo_format_datetime_range()
.
This takes two DateTime objects, and format string and a separator (by default a hyphen). It then formats the two DateTime objects as a range, inserting a hyphen where appropriate:
$date1 = new DateTime( '2015-06-01' ); //1st June
$date2 = new DateTime( '2015-06-05' ); //5th June
$format = 'jS F Y'; //Format date as "1st June 2015"
//3.0.0+ only:
echo eo_format_datetime_range( $date1, $date2, $format );
//Prints
1st - 5th June 2015
If the two dates ‘match’ it just displays the on:
$date1 = new DateTime( '2015-06-01' ); //1st June
$date2 = new DateTime( '2015-06-01' ); //1st June again
echo eo_format_datetime_range( $date1, $date2, $format );
//Prints
1st June 2015
Thanks for responding!
That’s a bummer because grouping events is such a great option, but those single events look silly with the date shown twice.
I did make changes to the single-event-meta template so that for all day events, it would display “all day,” but I didn’t think about changing the shortcode template. I’ll look into that (the link you gave is going to an error page, but I’ll try to find it).
Look forward to that new release.
Thanks!