CalDav Calendar Viewer
·
Displays events from iCal (.ics) feeds in a responsive list. Supports recurring events, multiple feeds with Basic Auth and encrypted credentials.
CalDav Calendar Viewer fetches and displays events from any standard iCal (.ics) feed directly on your site using a simple shortcode. It supports multiple calendar feeds, each with its own URL and optional username/password for authenticated endpoints.
Key Features:
- Multiple Calendar Feeds – Configure as many feeds as you need, each with a unique ID.
- iCal / RFC 5545 Support – Parses standard
.icscalendar feeds including all-day events, times, locations, and descriptions. - Recurring Events – Expands RRULE recurrences (DAILY, WEEKLY, MONTHLY, YEARLY) including BYDAY, BYMONTHDAY, INTERVAL, COUNT, UNTIL, and EXDATE.
- DURATION Support – Derives the end time from a
DURATIONproperty whenDTENDis absent. - Basic Authentication – Supply a username and password per feed for protected calendars.
- Encrypted Credentials – Passwords are stored using AES-256-CBC encryption in the database.
- Caching – Configurable cache lifetime reduces external HTTP requests (defaults to 1 hour).
- Cache Management – View the number of currently cached feed entries and clear them with one click from the admin settings page.
- Async Loading – Calendar events are fetched via AJAX so the containing page renders immediately.
- Label / Category Filtering – Filter events by iCal
CATEGORIESlabels using thelabelshortcode attribute. Accepts a comma-separated list; all plain labels must be present on an event for it to be shown. Prefix a label with!to exclude events that carry that category. Matching is case-insensitive. - Clickable Events – Events that carry a
URLproperty in the iCal feed are rendered as clickable links. - 7-Day Rolling Window – Automatically fetches and displays only the next 7 days of events.
- Responsive Event List – Clean event list layout that adapts to all screen sizes.
- Event Tooltips – Hover over an event to see its description.
- Description Prefix Filtering – Remove lines from event descriptions that start with configurable prefixes. Useful for hiding internal metadata added by calendar applications.
Configuration
Navigate to Settings → CalDav Calendar Viewer in the WordPress admin panel.
Adding a Feed
Click + Add Feed and fill in:
- Feed ID – A unique lowercase identifier (letters, numbers, hyphens, underscores) used in the shortcode.
- iCal Feed URL – The full URL to the
.icscalendar feed. - Username – Username for Basic Authentication. Leave blank for public feeds.
- Password – Password for Basic Authentication. Stored encrypted. Leave blank to keep the current value.
You can configure multiple feeds — each gets its own ID.
General Settings
- Cache Lifetime (seconds) – How long fetched calendar data is cached. Set to
0to disable caching. Default:3600(1 hour). - Description Line Prefixes to Remove – Newline-separated list of prefixes. Any line in an event’s description that starts with one of these prefixes is removed from the tooltip. Useful for hiding internal metadata added by calendar apps (e.g.
X-APPLE-,Reminder:).
Cache Management
The settings page shows how many calendar feeds are currently cached. Use the Clear Cache button to delete all cached responses and force fresh fetches on the next page load.
Usage
Basic Shortcode
[caldcavi_calendar id="my-feed"]
Shortcode Attributes
id(required) – The feed ID configured in Settings → CalDav Calendar Viewer.label(optional) – A comma-separated list of iCalCATEGORIESvalues to filter events by. All plain labels must be present on an event for it to be shown. Prefix a label with!to exclude events that carry that category. Matching is case-insensitive. Omit to show all events.
Examples
[caldcavi_calendar id="team-calendar"]
[caldcavi_calendar id="hr-events"]
[caldcavi_calendar id="team-calendar" label="Work"]
[caldcavi_calendar id="team-calendar" label="Work,Important"]
[caldcavi_calendar id="team-calendar" label="Work,!Cancelled"]
[caldcavi_calendar id="team-calendar" label="!Private"]
