Home › Forums › Calendar Products › Events Calendar PRO › Theatre events proving complex to schedule as recurring events.
- This topic has 17 replies, 5 voices, and was last updated 10 years, 2 months ago by
Geoff.
-
AuthorPosts
-
February 11, 2016 at 4:21 pm #1071771
Abby
ParticipantThanks for that Josh. We have been working on it too and have come up with the following (posting it here for the record):
from theme functions.php
add_filter(‘tribe_events_event_schedule_details’, ‘custom_events_event_schedule_details’, 1, 4);
function custom_events_event_schedule_details($html, $postid, $before, $after)
{
if(tribe_is_recurring_event($postid))
{
$start_dates = tribe_get_recurrence_start_dates( $postid );
$firstdate=reset( $start_dates );
$lastdate=end( $start_dates );
$firstmonth=$firstdate;
$first=getdate(strtotime($firstdate));
$lastmonth=$lastdate;
$last=getdate(strtotime($lastdate));
if($first[‘mon’]==$last[‘mon’])
{
$dthtml=$first[‘mday’].” – “.$last[‘mday’].” “.$first[‘month’];
}
else
{
$dthtml=$first[‘mday’].” “.$first[‘month’].” – “.$last[‘mday’].” “.$last[‘month’];
}
$dthtml=”<div classname=\”tribe-events-period\”><abbr title=\”Season from “.tribe_format_date($firstdate,false).” until “.tribe_format_date($lastdate,false).”\” classname=\”tribe-events-period-dates\”>”.$dthtml.”</abbr></div>\n”;
$html=$dthtml; // nb this replaces the normal start date
}
return $html;I’m not marking this as resolved as I believe it needs to stay unresolved pending the recurring description fix? But I think we have sorted the dates, so thank you.
February 15, 2016 at 10:49 pm #1073530Josh
ParticipantHey Abby,
Awesome! This looks like a great solution here!
For the recurring description issue, I have this thread added to our internal ticket for tracking that particular bug. I’ll go ahead and close this thread for now. Even with the thread being closed, you’ll still receive the updates about the issue as our team makes progress on addressing this one.
If you have any further questions, please don’t hesitate to open a new thread.
Thanks!
February 18, 2016 at 10:40 am #1077227Geoff
MemberHey there, Abby!
Just wanted to jump in here and let you know that we released Events Calendar PRO 4.0.6 last night and it included a fix for this issue. Please check your WordPress updates, or you can also grab the latest copy by logging into this site and heading to My Account > Downloads.
Thanks for your patience while we worked on this! Please feel free to open a new thread if you continue to experience the same issue or have any other questions that pop up during updating and we’d be happy to help. 🙂
Cheers!
Geoff -
AuthorPosts
- The topic ‘Theatre events proving complex to schedule as recurring events.’ is closed to new replies.
