This function obtains all events from the calendar, processes the repeat rules, compares the start and end ranges, sorts the events by dates and returns array with events.
You can use this functions in your custom template page like following:
$events = stec_get_events_between('2019-01-01', '2019-12-31');
foreach ($events as $event) {
echo "<p>{$event->get_title()}</p>";
echo "<p>{$event->get_start_date('d M Y H:i:s')}</p>";
$location_data = $event->get_parsed_location();
if ($location_data) {
echo "<p>{$location_data->full_address}</p>";
}
echo '<hr>';
}
Hi!
How can I use WordPress Actions for creating Custom Template for Events Displaying?
I need something like Grid View only with slider functionality.
I need to display these fields:
Also how can I display in custom template repeated events?
Thank you!
Hi,
Here's how you can obtain events for given date range.
First place this function in your theme functions.php file:
This function obtains all events from the calendar, processes the repeat rules, compares the start and end ranges, sorts the events by dates and returns array with events.
You can use this functions in your custom template page like following:
Stachethemes Developer
Great!
This is what I need!
Thank you!
Hi!
I use for date range this combination (I want to display only upcoming events):
$events_start = date('m/d/Y');
$events_end = date('Y-m-d', strtotime($date. ' + 30 days'));
$theme_path = get_stylesheet_directory_uri();
$events = stec_get_events_between($events_start, $events_end);
and get this error:
Invalid UNTIL property: The value of the UNTIL rule part MUST be a date if DTSTART is a date.
I think it is related with events on current date.
Can you help?
Thanks.
Hi,
Is it possible to send me ics file of your events?
Stachethemes Developer