Custom single event page – wrong date with recurring events
-
I’m building a custom single events page and I tried to display the date of a recurring event (with multiple entries, not displayed as a single event). Unfortunately…
get_post_meta( get_the_ID(), ‘mec_start_date’, true );
… pulls the start date of the first event in that row (e.g. 2021-03-01) but not the start date of the event that is currently displayed (e.g. 2022-02-20). Same of course with the end date. I used the functions you suggest here:
https://webnus.net/dox/modern-events-calendar/overriding-mec-single-event-page/
Interesting: The countdown widgets displays a correct countdown time. So how can I display the date and time related to the current event?
Workaround:
$single = new MEC_skin_single();
$single_event_main = $single->get_event_mec(get_the_ID());In $single_event_main the very last array [date] seems to contain the actual date for the current event. But I think this is not the way it is intended to get it.
- The topic ‘Custom single event page – wrong date with recurring events’ is closed to new replies.