Custom Options
If you are writing your own custom code to extend the plugin’s functionality, use customoptions
to create your own configuration options for the shortcode. The value passed in this attribute is automatically converted into an array using the pipe character |
as a delimiter. (Note that if no pipes are present in the value, it will still be converted into an array with one node.)
Debugging
By default the plugin uses WordPress transients to cache parsed calendar data for one hour. This improves performance and avoids exceeding request limits that may be set on your calendar server. To temporarily bypass this caching while testing configuration changes, use reload="true"
. Please note: you should only use this feature when you need to force a reload for testing purposes. Do not leave this setting on permanently, especially if your site receives a large amount of traffic.
Use debug="true"
to turn on the debugger. Only Administrator-level users will see debugging code. When turned on, a panel will appear at the bottom of the screen with a raw dump of the ICS data array, and possibly additional debugging information.
Extend Multi-Day Events
Per the iCalendar specification, the DTEND
value on all-day events is the first free date in the range, i.e. the date after the event finishes. By default, multi-day all-day events are handled this way. If your feed includes multi-day all-day events that should include the date specified by DTEND
, add extendmultiday="true"
to your shortcode.
Hide “All Day” Indicator
By default, an “ALL DAY” label appears above all-day events in the display. You can set hidealldayindicator="true"
to prevent displaying this label.
Limit Days
By default, the plugin limits the displayed date range to the farthest future event in your feed. Use limitdays="NUMBER"
to override the default limit. Replace NUMBER
with your desired number of days. Note: If your calendar has a very large number of events, setting this value above 365 may affect performance.
Method
The method
attribute can be used to force the plugin to only try retrieving the ICS feed via either cURL or fopen. By default, the plugin tries cURL first and then falls back on fopen. In cases where cURL fails, but with a long timeout, you can use method="fopen"
in the shortcode to bypass cURL. This can significantly improve page load times for calendars that experience this issue with cURL receiving an HTTP 500 error from the calendar server. Conversely, if you only want to load the feed via cURL, and not allow the fopen fallback, use method="curl"
in your shortcode.
“No Mobile”
The standard treatment for month and week views on mobile is to stack the display in a list style, because the grid does not work well scaled to the small size of a mobile display. However, if you wish to retain the grid, add nomobile="true"
to your shortcode. Note that you will probably need to add your own custom CSS to make this display usable. Be sure to wrap your CSS in @media screen and (max-width: 782px) { }
and use .ics-calendar.nomobile .ics-calendar-month-grid
in your CSS selectors.
Past Days
By default, list and month views do not include past dates (before the first of the current month, in month view) unless startdate
is used to set an arbitrary start date. You can also set a rolling start by using pastdays="NUMBER"
where NUMBER
is replaced with the number of days back you wish to begin. For instance, to show 3 previous months you could enter pastdays="90"
. This option has no effect in week view. Note: You may need to make adjustments to the `limitdays` option when this is used, as it calculates from the first displayed date, not the current date.
Recurrence
By default, the plugin will show all instances of recurring events that fall within the displayed date range of your calendar. Add the skiprecurrence="true"
parameter to skip parsing recurring events. Use of this setting is discouraged in most cases, as it will prevent recurring events from displaying; however it may be useful for improved performance with extremely large calendars, if recurrences are not needed.
Version 7.0 introduced recurrence frequency messages in the event description block. You can hide these using hiderecurrence="true"
, or you can hide specific frequency types by entering one or more pipe-delimited frequencies to hide, e.g. hiderecurrence="yearly"
or hiderecurrence="yearly|monthly"
.
Timezone Override
By default, the feed will display events with times adjusted for the local timezone configured under Settings > General > Timezone. You can override the site’s timezone for individual feeds by adding the tz="TIMEZONE"
parameter. You must use a valid named timezone value or the setting will be ignored and the site’s local timezone setting will be used. If your calendar is displaying multiple feeds, you can assign each a separate timezone override, as with feed labels or colors, by entering multiple values, pipe-delimited, in the same order as the feeds in the url
parameter, e.g. tz="America/New_York|Europe/London|Pacific/Auckland"
. If you have multiple feeds but all are in the same timezone, you only need to enter the timezone once.