Skip to content
WordPress Events Calendar
  • FeaturesExpand
    • Monthly calendar viewColour-coded month grid
    • List viewUpcoming events in order
    • Daily agenda viewOne day on a timeline
    • Event managementDates, venues and colours
    • Venues and organizersSave once, reuse anywhere
    • Timezones and all-day eventsThe right time for everyone
    • Gutenberg blockBlock or one shortcode
    • Add to CalendarGoogle, Apple and Outlook
    • Categories and tagsGroup, filter and colour
    • Google Calendar importImport and sync iCal feeds
    • Event submissionsVisitors send their events
  • Live Demo
  • DocsExpand
    • InstallationUp and running in minutes
    • Creating eventsDates, times, venues, images
    • Shortcode and blockEvery option explained
    • Switch from The Events CalendarBring your events across
    • Import a calendarGoogle, Outlook, Apple, .ics
    • TroubleshootingFix common problems
    • Event submissionsForm, approval and popup
    • Page buildersElementor, Divi, Avada and more
    • TranslationYour language, Loco Translate
    • DevelopersHooks, REST API, templates
  • CompareExpand
    • vs The Events Calendar
    • vs Modern Events Calendar
    • vs Sugar Calendar
    • vs EventON Alternative
  • Blog
  • Download free
WordPress Events Calendar

Home / Docs / Developers

Developer Documentation

Monthly Events Calendar is built for developers: an events calendar REST API, standard WordPress post types, a template you can override from your theme, and hooks for each part of the event page. A version in brackets, such as (1.8), shows when something was added.

Read events over REST

GET /wp-json/ecwp/v1/events: public, read-only, one item per date.

REST API →

Change the event page

Copy one template to your theme, or use the event page hooks.

Template and hooks →

Create events from code

Save dates with the event store, or send events through the submission rules.

Create events →

Hook into the calendar

PHP filters for loading, colours and the popup, and JavaScript events.

Filters and events →

On this page

  • REST API
  • Data model
  • Template override
  • PHP actions and filters
  • Create events from code
  • Add event popup (1.8.1)
  • JavaScript
  • Translations

REST API

GET /wp-json/ecwp/v1/events

Public, read-only, returns published events only. Each item is one occurrence, so an event on several dates appears once per date.

ParameterExampleNotes
year, monthyear=2026&month=11Events overlapping that month. Default: current month.
upcoming, fromupcoming=1&from=2026-11-05Events starting on or after that day.
searchsearch=yogaMatching events on any date.
timezonetimezone=Asia/KolkataVisitor’s IANA timezone, used for month and day boundaries. Default: site timezone.
tax, termtax=wood-category&term=12Filter by event category or tag (term ID, or several IDs separated by commas).
per_pageper_page=501–200, default 100.

Response

{
  "id": 123,
  "source": "ecwp",
  "title": { "rendered": "Summer Fair" },
  "link": "https://example.com/events/summer-fair/",
  "ecwp": {
    "startdate": 1786000000,
    "enddate": 1786010800,
    "allday": false,
    "timezone": "Europe/London",
    "color": "#6d28d9",
    "excerpt": "Stalls, music and food…",
    "img": "https://example.com/wp-content/uploads/fair-150x150.jpg",
    "venue": "Town Square"
  }
}

startdate and enddate are Unix timestamps. source is tec for events read from The Events Calendar in compatibility mode.

Other endpoints

EndpointWhat it is
GET /wp-json/ecwp/v1/settingsThe display settings the calendar uses. Public.
POST /wp-json/ecwp/v1/submissionsCreate an event under the submission rules (1.8). Reference
GET /wp-json/ecwp/v1/submissions/formThe submission form’s markup, loaded by the Add event popup (1.8.1).
GET /wp-json/wp/v2/wood-eventWordPress’s own endpoint for events, with the same ecwp field.

Data model

ItemName
Events post typewood-event
Venues post typewood-venue
Organizers post typewood-organizers
Categories / tagswood-category / wood-event-tag
Event dates (post meta)_ecwp_start, _ecwp_end (local time, Y-m-d H:i:s), _ecwp_timezone, _ecwp_all_day
Occurrences table{prefix}ecwp_occurrences (UTC; rebuilt from the meta)
Venue / organizers on an eventecwp_venue_id, ecwp_organizer_id (array)
Colour, websiteecwp_event_text_bg, ecwp_event_url_website
Shortcodes[wp_monthly_events], [wp_monthly_events_submit]
Blocksecwp/calendar, ecwp/submit-event

The 1.5 keys ecwp_event_date_start and ecwp_event_date_end (Unix timestamps) are still kept in sync, and writing them still works, so older import scripts don’t break.

Template override

Copy public/partials/single-wood-event.php from the plugin to your theme as single-wood-event.php and edit it. The plugin uses your theme’s copy automatically.

To show the calendar from a theme template:

<?php echo do_shortcode( '[wp_monthly_events view="list"]' ); ?>

PHP actions and filters

Event page

HookTypeUse
modern_single_template_start, modern_single_template_endactionWrap the event page.
modern_single_sidebaractionOutput the event details sidebar.
modern_organizersactionOutput the organizers list.
monthly_events_timefilterChange how a date/time is formatted on the event page.
monthly_events_venuefilterChange the venue name shown.
modern_sidebar_titlefilterChange the sidebar heading.
ecwp_event_schemafilterChange the Event structured data on event pages; return false to print none (1.8).

Calendar and loading

HookTypeUse
ecwp_load_assetsfilterForce the calendar’s scripts on or off for a page (1.7). They load only where a calendar or an event is shown.
ecwp_load_fontsfilterReturn false to turn off the bundled fonts (1.7).
ecwp_default_event_colorfilterColour for events without one (1.6).
ecwp_archive_calendarfilterReturn false to keep your theme’s archive at /events/ (1.6).

The Events Calendar compatibility

HookTypeUse
ecwp_tec_shortcode_aliasfilterReturn false to stop handling [tribe_events] (1.6).
ecwp_tec_event_colorfilterColour for events shown from The Events Calendar (1.6).
ecwp_tec_import_past_window, ecwp_tec_import_future_windowfilterSeconds before/after today to import recurring dates (1.6).
ecwp_tec_import_seo_meta_prefixesfilterMeta key prefixes copied on import (1.6).

Create events from code

Save an event’s dates with the event store. It writes the meta and rebuilds the occurrences:

Ecwp_Event_Store::save( $post_id, '2026-12-01 18:00:00', '2026-12-01 20:00:00', 'Europe/London', false );
$dates = Ecwp_Event_Store::get( $post_id ); // start_local, end_local, timezone, all_day, start_ts, end_ts
  • From a form: ecwp_submit_event( $args ) creates an event under the rules set in Events Calendar → Submissions (who may submit, approval, emails), and POST /ecwp/v1/submissions does the same over REST (1.8). Full reference
  • Calendar import: Ecwp_Ical_Importer::sync_source( $id ) syncs a saved calendar, for example on a schedule; Ecwp_Ical_Importer::sources() lists them. Filters ecwp_ical_parse_args and ecwp_ical_event_postarr; actions ecwp_ical_imported and ecwp_ical_synced (1.7).

Add event popup (1.8.1)

The Add event button opens the submission form in a popup on the calendar. The form is fetched from GET /ecwp/v1/submissions/form when the button is first pressed.

HookTypeWhat it does
ecwp_submit_popup_showfilterWhether the current visitor gets the button. By default: the button is turned on and this person may submit events.
ecwp_submit_popup_positionfilterWhere the popup opens: right, left or center.
ecwp_submit_popup_formfilterThe popup form’s options, the same as the shortcode’s: hide, category, button.

A shorter form in the popup:

add_filter( 'ecwp_submit_popup_form', function ( $atts ) {
    $atts['hide'] = 'timezone,website';
    return $atts;
} );

Show the button to logged-out visitors too, when only members may submit. The popup then asks them to log in and brings them back to the calendar:

add_filter( 'ecwp_submit_popup_show', function ( $show ) {
    return $show || ! is_user_logged_in();
} );

JavaScript

Two events are sent on document:

  • ecwp:add-event opens the popup. Dispatch it from your own button: document.dispatchEvent( new CustomEvent( 'ecwp:add-event' ) );. It works on pages where the calendar shows the Add event button.
  • ecwp:event-submitted fires after an event is sent from any submission form. event.detail has the event’s id, its status (pending or publish) and, for published events, its link.

From 1.8.2 the calendar’s button texts can be changed with WordPress’s hooks script: mCalendar-text-latestEvent (Upcoming Events), mCalendar-text-searchEvent (Search Events) and mCalendar-text-addEvent (Add event). Load your script after wp-hooks:

wp.hooks.addFilter( 'mCalendar-text-addEvent', 'my-theme', function () {
    return 'Suggest an event';
} );

Translations

The text domain is monthly-events-calendar. Translate on translate.wordpress.org or with Loco Translate.

WordPress Events Calendar
  • Switch from The Events Calendar
  • About
  • Changelog
  • Roadmap
  • Support
  • Contact

© 2026 WP Monthly Events

Scroll to top
  • Features
    • Monthly calendar viewColour-coded month grid
    • List viewUpcoming events in order
    • Daily agenda viewOne day on a timeline
    • Event managementDates, venues and colours
    • Venues and organizersSave once, reuse anywhere
    • Timezones and all-day eventsThe right time for everyone
    • Gutenberg blockBlock or one shortcode
    • Add to CalendarGoogle, Apple and Outlook
    • Categories and tagsGroup, filter and colour
    • Google Calendar importImport and sync iCal feeds
    • Event submissionsVisitors send their events
  • Live Demo
  • Docs
    • InstallationUp and running in minutes
    • Creating eventsDates, times, venues, images
    • Shortcode and blockEvery option explained
    • Switch from The Events CalendarBring your events across
    • Import a calendarGoogle, Outlook, Apple, .ics
    • TroubleshootingFix common problems
    • Event submissionsForm, approval and popup
    • Page buildersElementor, Divi, Avada and more
    • TranslationYour language, Loco Translate
    • DevelopersHooks, REST API, templates
  • Compare
    • vs The Events Calendar
    • vs Modern Events Calendar
    • vs Sugar Calendar
    • vs EventON Alternative
  • Blog
  • Download free