JW Event Schedule
A plugin to create, manage and list events in wordpress.
by Tonny Santana · github.com/tonnysantana2004/jw-event-schedule · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/tonnysantana2004/jw-event-schedule/archive/refs/heads/main.zipA WordPress plugin to manage events with the following features:
- Custom post type for events
- Event types as taxonomy
- Custom fields on Gutenberg Sidebar
- Attendance system
- E-mail notifications when events are created, updated or canceled.
This README explains installation, basic usage, available features and REST examples so a non-technical user can get started quickly.
Live Project
- You can access the project in my website: Click to access
Quick Install
-
Upload
- Download the zip file of the repository, and upload it on your wordpress website.
-
Activate
- Go to Plugins → Installed Plugins and activate "JW Event Schedule".
Changing the source code
- Run the following commands whenever you change some gutenberg block
npm run build(ornpm run startwhile developing)composer dump-autoloadorcomposer require/installif you change vendor code.
What this plugin provides
- A new custom post type:
Event(slug:event, archive:/events) - A taxonomy:
Event Type(slug:event-type) - Custom meta fields for events:
event_date— timestamp for event date and timeevent_location— free text locationattendance_list— an array of user IDs who confirmed attendance
- Gutenberg blocks:
Listing Grid— a block to show a grid/listing of events on any post/page
- Private REST endpoints to toggle attendance:
POST /wp-json/jwes/v1/attendance— add an attendance entryDELETE /wp-json/jwes/v1/attendance— remove an attendance entry
- Notification emails:
- Sends email notifications when an event is created (published), updated, or moved to trash (canceled) so that attendees can be informed.
- Admin improvements:
- Event list columns shows the "Event Date" and "Event Location" meta values
- Archive filtering by a
date_range
- Internalization Ready:
- The plugin's main texts are ready for future translations. For now, we have translations for Portuguese.
Creating and Managing Events (Admin)
- In the admin menu go to Events → Add New.
- Fill in:
- Title
- Excerpt
- Content (description of the event)
- Assign an Event Type
- Event meta:
- Use the editor sidebar (SideBar block or block editor meta fields) to set:
- Event Date
- Event Location
- Use the editor sidebar (SideBar block or block editor meta fields) to set:
- Publish the event.
After publishing:
- The event will appear on the events archive (
/events) and already with a custom template pre-made. - The attendance list is stored in a post meta key
attendance_list.
Frontend: Attending an Event
- Only logged-in users can toggle attendance.
REST endpoints:
-
Add attendance
- POST /wp-json/jwes/v1/attendance
- Payload:
user_id— integer (current user)post_id— integer (event post ID)
- Permission: user must be logged in
- Response: JSON with message, updated
attendancearray and timestamp
-
Remove attendance
- DELETE /wp-json/jwes/v1/attendance
- Payload:
user_id— integerpost_id— integer
- Permission: user must be logged in
- Response: JSON with message, updated
attendancearray and timestamp
Gutenbeg
-
Listing Grid (
jw-event-schedule/listing-grid)- Place on any page to display a grid of events. The block is registered for use in the block editor.
-
SideBar (
jw-event-schedule/sidebar)- Editor sidebar integration that shows and allows editing of the event meta fields when editing an
eventpost type.
- Editor sidebar integration that shows and allows editing of the event meta fields when editing an
Admin Columns & Frontend Filtering
-
The admin Events list shows two custom columns:
- Event Date — formatted according to WordPress default timezone
- Event Location
-
Archive date filtering
- You can filter the events archive via a
date_rangeGET parameter. The plugin expects a range using the wordto, for example:/events?date_range=2024-01-01 to 2024-01-31
- This adjusts the archive query to only return events whose
event_datefield falls between the provided start and end.
- You can filter the events archive via a
Notifications
-
The plugin hooks into post saves for the
eventpost type and sends email notifications about:- New event published
- Event updated
- Event moved to trash (canceled)
-
Notifications are sent to users related to the event (for example users in the attendance list). Emails use WordPress
wp_mail().
Where to look in the code
- Main plugin file:
jw-event-schedule/jw-event-schedule.php - Post type and REST endpoints:
jw-event-schedule/src/PostType.php - Frontend scripts and styles:
jw-event-schedule/assets/frontend/ - Gutenberg scripts, blocks, and build sources:
jw-event-schedule/src/blocks/andjw-event-schedule/build/blocks/ - Notifications behavior:
jw-event-schedule/src/Notifications.php