Developers / CalendarWP
Develop with CalendarWP
Extend events without editing the plugin. CalendarWP exposes WordPress actions and filters for event lists, overlays, add-on registration and public event knowledge.
Choose the smallest extension
| What you want to change | Start here |
|---|---|
| Event page or archive layout | Templates and patterns, using a saved Site Editor override or your own theme |
| Extra information on Upcoming Events cards | calendarwp_upcoming_events_item_meta |
| Extra content in an event overlay | calendarwp_event_overlay_content |
| Public facts available to Compass | calendarwp_event_knowledge_public_sections |
| Your own separately installable feature | Build an add-on |
| Hook names, argument order and return types | Hook reference |
Understand the content model
CalendarWP stores event content as WordPress posts. Calendars, venues and organizers are taxonomies attached to those events. A recurring event can have multiple occurrences; its post ID identifies the series, not a single booking or occurrence.
| Constant | Current value | Represents |
|---|---|---|
RHC_EVENT_POST_TYPE |
rhc-event |
Event post type |
RHC_CALENDAR_TAXONOMY |
rhc-calendar |
Calendar terms |
RHC_VENUE_TAXONOMY |
rhc-venue |
Venue terms |
RHC_ORGANIZER_TAXONOMY |
rhc-organizer |
Organizer terms |
RHC_VERSION |
Installed core version | Runtime compatibility check |
Use the constants after CalendarWP has loaded. The CWP_ aliases exist too. Do not assume that an event's author is its Personal Calendar owner, or that the WordPress publication date is its event start date.
Event schedules generate an occurrence index for date-based queries. Public knowledge is a derived Markdown profile in protected event metadata, not a directory of public .md files. It is refreshed from saved facts; upcoming dates and live booking availability are handled separately.
Keep your code independent
Create a separate WordPress plugin with your own prefix or namespace. Check dependencies before using CalendarWP constants or classes. Never modify CalendarWP core, bundled assets or third-party vendor files. Updates can replace those files.
Use actions for notifications and filters to return a modified value. Register the correct accepted-argument count; always return the incoming value when you have nothing to change. WordPress documents the distinction in its hooks guide.
Respect visibility and live state
- Public output must not expose drafts, passwords, personal assignments, attendee identities, tokens or payment details.
- Escape your added HTML at output. A filter receiving HTML does not make your contribution safe automatically.
- Treat a display hook as presentation, not authorization to book or charge. Do not write to Scheduler or RSVP booking tables directly.
- Use WordPress APIs for your own posts, metadata, settings and capabilities. Do not write directly to the event occurrence index or Compass caches.
- Keep callbacks fast and deterministic. Avoid remote requests, database writes or AI calls during rendering.
- If you create REST endpoints, use your own namespace, validate arguments and enforce permissions server-side. See the WordPress endpoint guide.
Compatibility boundary
This reference describes extension points inspected in core 1.0.58-rc27. It is not a promise that every internal PHP class, REST payload, JavaScript object or CSS selector is a stable SDK. Check the source locations in the hook reference against the version you support and test upgrades on staging.
The example add-on is a starting point, not a complete commercial product. It does not grant access to CalendarWP's private update service or commercial add-on catalog. Distribute and update your own add-ons through a mechanism you control.