Cycle Chesterfield
WordPress plugin for Cycle Chesterfield specific functionality
by Dean Sas · github.com/dsas/cycle-chesterfield-plugin · 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/dsas/cycle-chesterfield-plugin/archive/refs/heads/main.zipWhat this plugin does
This WordPress plugin provides site-specific custom blocks and The Events Calendar display customisations for the Cycle Chesterfield website.
Current features:
- Registers two editor blocks for ride grade content.
- Shares centrally managed ride grade labels/descriptions with both blocks.
- Displays optional ride grades in the homepage Events List widget and the
/eventslisting. - Hides event end times in The Events Calendar output so time ranges like
6:30 pm - 7:30 pmdisplay as6:30 pm.
Included blocks
Ride Grade
The Ride Grade block lets editors choose a ride grade in the block settings and outputs the matching description automatically.
When inserted, the block renders a heading such as Grade 1 Ride followed by the appropriate ride description.
This block is limited to one instance per post, which helps keep an event's ride difficulty clear and unambiguous.
When an event is saved, the selected grade is also stored as event metadata. This lets the plugin show the compact grade label alongside that event's date in the /events listing and in the homepage Events List widget. Events without a Ride Grade block, including non-ride and older events, do not display a grade. The plugin also supplies the Events Calendar list-date template used by /events, so this display customisation deploys with the plugin.
Ride Grades
The Ride Grades block displays all available ride grades together with their descriptions.
Use this on explainer pages where you want visitors to compare the different ride levels side by side.
Event time display customisation
The plugin includes a dedicated customisation file:
includes/hide-event-end-times.php
This customisation keeps event end times in stored event data, but hides them in frontend display contexts used on the site, including:
- The Events Calendar single-event time display.
- The Events Calendar schedule detail formatting.
- The Events Calendar event date-time block output.
- The Events Calendar widget events list date output.
This ensures users see a single start time (for example, 6:30 pm) instead of a start/end range.
Dependencies
For event-time customisations, this plugin expects The Events Calendar plugin to be active.
Try It In Playground
You can try the plugin in WordPress Playground here:
Try Cycle Chesterfield in Playground
Releases
GitHub Actions creates a release automatically when a tag matching v* is pushed to the repository.
Each release includes a WordPress-installable asset named cycle-chesterfield.zip.
Typical release flow:
- Update the plugin version as needed.
- Commit and push your changes.
- Create and push a tag such as
v1.0.0.