Advanced iCal Export
Do you want to customize the iCal export options? We can help you export a unique range of events, even up to a whole year at once.
With The Events Calendar, you have the ability to export events through an iCal feed. By default near the bottom of every calendar page, you can find a blue “Export Events” button. When you click that you will receive a link the feed containing the events of that view.
Since there is no year view with the calendar, there is no way to get a feed for the events spanning the whole year. This is where this extension comes into play.
The Advanced iCal Export extension gives you advanced export possibilities through the iCal feed.
You will need to enter a URL into your browser’s address bar with specific parameters and you will be rewarded with a corresponding feed.
Parameters
The URL parameters you can / must use:
ical=1 | required | tells the website that we need an iCal feed |
tribe_display=custom | required | tells the website that we are using a custom date range |
start_date=[date] | optional | you can leave it empty, set a start year, or a specific start date format is yyyy or yyyy-mm-dd |
end_date=[date] | optional | you can leave it empty, set an end year, or a specific end date format is yyyy or yyyy-mm-dd |
Examples
These are the different URL parameters you can use for advanced iCal exporting.
- Simple: exports events of the current year, e.g. from January 1 to December 31 of the current year:
http://example.com/events/?ical=1&tribe_display=custom - If only start date is defined, then events until the end of the current year will be exported, e.g. from February 10, 2017, until end of the current year:
http://example.com/events/?ical=1&tribe_display=custom&start_date=2017-02-10 - If only end date is defined, then events starting from January 1 of the current year will be exported, e.g. from January 1 of current year until July 31, 2020:
http://example.com/events/e?ical=1&tribe_display=custom&end_date=2020-07-31 - If both start and end date are defined, then events from that time range will be exported, e.g. from July 1, 2017 until June 30, 2018:
http://example.com/events/?ical=1&tribe_display=custom&start_date=2017-07-01&end_date=2018-06-30 - If only start year is defined, then all events starting after January 1 and ending December 31 of that year will be exported, e.g. from January 1, 2019, until December 31, 2019:
http://example.com/events/?ical=1&tribe_display=custom&start_date=2019 - If only end year is defined, then events from January first of the current year until December 31 of the set year will be exported, e.g. from January 1 of the current year until December 31, 2020:
http://example.com/events/?ical=1&tribe_display=custom&end_date=2020 - If both start and end year are defined, then events from January 1 of the start year until December 31 of the end year will be exported, e.g. from January 1, 2018, until December 31, 2020:
http://example.com/events/?ical=1&tribe_display=custom&start_date=2018&end_date=2020
Note: to prevent performance issues the end date can be a maximum of 3 years into the future. For example, as of today (July 2018) events before December 31, 2021 (2018 + 3 = 2021) will be exported.
iCal Export Changelog
- Version 1.1.0
- October 11, 2019
- Fix – The extension now works with TEC 4.9.8
- Fix – Sanitize incoming values
- Tweak – Feed will now include events happening on the end date
- Version 1.0.0
- July 9, 2018
- Initial release