{CODICTS} Snippets is now available

MyListing Events Repeater Field

The {CODICTS} MyListing Events Repeater Field plugin adds a fully configurable repeater field to MyListing designed specifically for events. Listing owners can add one or many events per listing, each with an event name, start and end dates (with optional time picker), location (country, state, city), website URL, and description. On the single listing page, events are displayed in a clean timeline UI, automatically categorized into upcoming/ongoing and past events, with an “Add to Google Calendar” button.

Child theme required: The plugin copies template files into the child theme for the form field and content block. Without a child theme, the plugin cannot install its templates and will display an error notice.

Installation & Activation

Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.

After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.

On activation, the plugin automatically copies its template files into your child theme. Navigate to any Listing Type → Fields tab to start adding the Events Repeater field.


Key Features

FeatureDescription
Repeater FieldListing owners can add multiple events per listing, each as a separate entry with its own details.
Date & Time PickerStart and end date pickers with an optional time selection mode.
Location DropdownsCountry and State/Province dropdowns powered by WooCommerce data, plus a free-text City input.
Configurable Sub-FieldsEach sub-field (name, date, location, URL, description) can be individually shown/hidden and marked required/optional.
Upcoming & Past TimelineEvents are automatically sorted and categorized into upcoming/ongoing and past events on the listing page.
Google Calendar Integration“Add to Google Calendar” button for upcoming events, pre-filled with event details.
Configurable LimitsSet maximum events per listing, character limits for name and description, and past date restrictions.
Strict ModeOptionally require the previous event entry to be completed before adding a new one.
Older Browser SupportJavaScript fallback included for browsers that don’t support modern CSS selectors.

How It Works

The plugin provides two components: a field for the add/edit listing form and a content block for the single listing page display.

ComponentWhere It AppearsWhat It Does
Events Repeater FieldAdd/Edit Listing formListing owners enter event details — name, dates, location, URL, and description — in a repeatable form where they can add multiple events.
Events Repeater BlockSingle listing pageDisplays events in a timeline layout, sorted into upcoming/ongoing and past categories, with Google Calendar integration.

Setting Up the Events Repeater Field

The field controls what listing owners see when they create or edit a listing.

1. Edit a listing type in the MyListing admin.

2. Navigate to the Fields tab.

3. Click the “{C} Events Repeater” quick-add button in the field sidebar, or add a field manually and select the Events Repeater type.

4. Configure the field settings:

SettingDefaultDescription
Label{C} Events RepeaterDisplay label for the field on the add/edit listing form.
Key(auto-generated)Unique field key used for data storage.
Description(empty)Help text shown below the field.
Minimum title length3Minimum characters for the event name.
Maximum title length25Maximum characters for the event name.
Maximum description length25Maximum characters for the event description.
Maximum events fields0 (unlimited)How many events a listing owner can add. Set to 0 for unlimited.
Enable timepickerOffWhen enabled, users can select a time of day in addition to dates.
Allow old event datesOffWhen enabled, users can enter dates in the past. When disabled, the earliest selectable date is today.
Strict item checkOffWhen enabled, the previous event entry must be completed before adding a new one.
RequiredOffWhether at least one event is required when submitting a listing.

Sub-Field Visibility & Requirements

Each sub-field within the repeater can be individually shown or hidden, and marked as required or optional:

Sub-FieldDefault: ShownDefault: Required
Event NameYesYes
Event DateYesYes
Event LocationYesYes
Event URLYesNo
Event DescriptionYesNo

Note: When a sub-field’s “Show” toggle is disabled, the “Required” toggle is automatically disabled and grayed out — you can’t require a hidden field.

5. Save the listing type.


Setting Up the Content Block

The content block controls how events are displayed on the single listing page.

1. Edit the same listing type.

2. Navigate to the Single Page (or Profile) tab.

3. Add a new content block and select “{C} Events Repeater”.

4. Configure the block settings:

SettingDefaultDescription
Label{C} Events RepeaterSection heading displayed above the events timeline on the listing page (e.g., “Upcoming Events”).
Source Field(none)Select which Events Repeater field provides the event data.
Number of upcoming/ongoing dates to show5How many upcoming or currently ongoing events to display.
Number of past dates to show0How many past events to display. Set to 0 to hide past events entirely.
Show “Add to Google Calendar” buttonOnDisplay a Google Calendar link for each upcoming event.

5. Save the listing type.


What Listing Owners See

On the add/edit listing form, listing owners interact with a repeatable event form. Each event entry includes (based on your visibility configuration):

Event Name — text input with configurable character limits. Required fields are marked with a red asterisk.

Event Date (From / To) — two date pickers for start and end dates. If the timepicker is enabled, users also select a time of day. If “Allow old event dates” is off, past dates cannot be selected.

Event Location — a Country dropdown, a State/Province dropdown that dynamically updates based on the selected country, and a free-text City input. The country and state dropdowns use searchable Select2 menus.

Event Website URL — a URL input with validation.

Event Description — a textarea with a configurable character limit.

Listing owners click “Add Event” to add additional entries. Each entry has a delete button with a confirmation dialog. If a maximum number of events is set, users cannot exceed the limit.


What Visitors See

On the single listing page, events are displayed in a vertical timeline layout:

Upcoming/ongoing events appear first, sorted chronologically. Each event shows the date (and time if enabled), event name (linked to the event URL if provided), location (city, state, country), and description.

Past events appear below (if configured to show), marked with a “completed” badge.

For upcoming events, an “Add to Google Calendar” button is displayed (if enabled). Clicking it opens Google Calendar pre-filled with the event’s title, dates/times, description, location, and the site’s timezone.


Example Setup

1. Activate the plugin with the MyListing theme and a child theme active. Ensure WooCommerce is installed for country/state dropdowns.

2. Edit a listing type (e.g., “Venues” or “Organizations”).

3. On the Fields tab, click the “{C} Events Repeater” quick-add button. Configure the field:

a. Set the Label to “Events.”

b. Set Maximum title length to 50 and Maximum description length to 200 for more descriptive event entries.

c. Set Maximum events fields to 10.

d. Enable Enable timepicker so listing owners can specify event start and end times.

e. Leave Allow old event dates off to prevent past dates from being entered.

f. Under Field Visibility & Requirements, keep Event Name, Event Date, and Event Location shown and required. Show Event URL and Event Description but leave them optional.

4. On the Single Page tab, add a “{C} Events Repeater” content block. Configure it:

a. Set the Label to “Events Schedule.”

b. Set Source Field to the Events Repeater field you created.

c. Set Number of upcoming/ongoing dates to show to 10.

d. Set Number of past dates to show to 3 so visitors can also see recent past events.

e. Keep Show “Add to Google Calendar” button enabled.

5. Save the listing type.

6. A venue owner creates a listing and adds three events — a concert next Friday, a workshop next month, and a holiday gala in December. For each they enter the name, start/end dates and times, location (United States → California → Los Angeles), an event website URL, and a short description.

7. On the venue’s listing page, visitors see the “Events Schedule” section with all three events in a timeline. Each shows the date, time, name (linked to the event website), location, and description. “Add to Google Calendar” buttons let visitors save events directly to their calendar.

8. After the concert passes, it automatically moves to the “Past Events” section with a “completed” badge, while the remaining events stay in the upcoming section.


Frequently Asked Questions

Does this require a child theme?

Yes. The plugin copies template files into the child theme for the form field and content block. Without a child theme, the plugin cannot install its templates.

Does this require WooCommerce?

WooCommerce is recommended but not strictly required. Without WooCommerce, the Country and State/Province dropdowns will be empty. If your events don’t need location data, you can disable the Event Location sub-field in the field’s visibility settings.

Is there a settings page?

No standalone settings page. All configuration is done within the MyListing listing type editor — add the Events Repeater field to the form and the Events Repeater content block to the single page layout.

Can I control which sub-fields are shown?

Yes. Each sub-field (name, date, location, URL, description) has individual “Show” and “Required” toggles in the field settings. You can hide any sub-field you don’t need and mark only the ones you want as required.

How are events sorted?

Events are automatically sorted chronologically. Upcoming and ongoing events (end date in the future) appear first. Past events (end date in the past) appear below, marked with a “completed” badge. The number of events shown in each category is controlled by the content block settings.

How does the Google Calendar integration work?

For upcoming events, an “Add to Google Calendar” button appears. Clicking it opens Google Calendar with the event’s title, start/end dates and times, description (with event URL if provided), location, and your site’s timezone pre-filled.

Can I enable time selection for events?

Yes. Enable the “Enable timepicker” option in the field settings. When enabled, the date pickers include a time selection. When disabled, events default to all-day (start at 00:00, end at 23:59).

Can listing owners enter past event dates?

Only if you enable the “Allow old event dates” option. When disabled (default), the earliest selectable date is today.

Can I limit how many events a listing owner can add?

Yes. Set the “Maximum events fields” option. When set to 0 (default), unlimited events are allowed. When set to a specific number, users cannot add more events than the limit.

What does “Strict item check” do?

When enabled, the previous event entry must be completed (all required fields filled) before the listing owner can add a new event. This prevents multiple empty event entries.

Can I change the delete button style?

Yes. By default, each event entry has a small trash icon button. To change it to a full-width “Delete Event” text button, add this to your child theme’s functions.php:

add_filter( 'codicts-mylisting-events-repeater-field::change-delete-buttons', '__return_true' );

Does the plugin create any database tables?

No. Event data is stored as serialized arrays in standard WordPress post meta on the listing. No custom database tables are created.

What happens when the plugin is deactivated?

The template files are removed from the child theme. Existing event data stored in post meta is preserved and will be available if you reactivate the plugin.


Troubleshooting

Events Not Showing on the Single Listing Page

CauseSolution
Content block not addedAdd the “{C} Events Repeater” content block to the listing type’s Single Page tab and set the Source Field to your Events Repeater field.
Wrong source fieldEnsure the content block’s “Source Field” is set to the correct Events Repeater field.
No events enteredThe listing must have at least one event with valid start and end dates.
All events are pastIf “Number of past dates to show” is set to 0 and all events have ended, nothing will display. Increase the past events count.

Country/State Dropdowns Are Empty

CauseSolution
WooCommerce not installedInstall and activate WooCommerce. The Country and State/Province data is sourced from WooCommerce.
WooCommerce not activeGo to Plugins → Installed Plugins and ensure WooCommerce is active.

Field Not Appearing in Listing Type Editor

CauseSolution
Templates not installedDeactivate and reactivate the plugin to force-reinstall templates. Verify template files exist in your child theme’s templates/ directory.
Plugin not activatedGo to Plugins → Installed Plugins and verify the plugin is active.
Quick-add button not visibleNavigate away from and back to the Fields tab, or refresh the page. The button is injected via JavaScript.

Date Validation Errors

CauseSolution
End date before start dateThe end date must be on or after the start date. Correct the dates in the event entry.
Past dates enteredIf “Allow old event dates” is disabled, dates in the past cannot be entered. Enable the option if past dates are needed.

Character Limit Too Short

CauseSolution
Default limits are lowThe default maximum title length is 25 and maximum description length is 25. Edit the Events Repeater field in the listing type editor and increase these values.

Template Overwrite Warning

The following template files in your child theme are managed by this plugin and may be overwritten on reactivation:

templates/add-listing/form-fields/events-repeater-field.php
templates/single-listing/content-blocks/events-repeater-block.php

If you’ve customized these files, back up your changes before deactivating/reactivating the plugin.

“MyListing Theme Not Detected” or “Child Theme Not Detected” Error

The MyListing theme and a child theme must both be installed and active. Go to Appearance → Themes to verify.


For further support, visit codicts.com or contact us at support@codicts.com.

CoDicts Co., Ltd. © 2021-2026. All rights reserved