{CODICTS} Snippets is now available

MyListing Work Hours Pro

The {CODICTS} MyListing Work Hours Pro plugin enhances the Work Hours field on the MyListing Add Listing form with productivity features that make setting business hours faster and easier. Copy one day’s hours to all other days with a single click, pull opening hours directly from Google Maps, or switch to a compact list view that shows all seven days at once.

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 the necessary template override files into your MyListing child theme. No additional setup is required for the “Copy to All” feature — it works immediately.

If you want to use the Google Maps Work Hours Picker, navigate to “Work Hours Pro” in the WordPress admin sidebar to configure your Google Maps settings.

Important: This plugin requires a MyListing child theme. If only the parent MyListing theme is active, the plugin will display an error notice and will not function. The plugin copies template override files into the child theme directory — without a child theme, there’s no location for these overrides.


Key Features

FeatureDescription
Copy to AllOne click copies the current day’s hours and status to all other days — no more setting the same hours seven times.
Google Maps Work Hours PickerSearch for or click on any business on Google Maps, see its opening hours, and copy them directly into the Work Hours field.
List View ModeAn alternative layout that shows all seven days in a compact vertical list instead of the default tab interface.
Current Location MarkerAdds a pulsating geolocation marker on both the Google Maps picker and MyListing’s standard location map fields.
Force Google MapsUse Google Maps for the work hours picker even if your site uses Mapbox or another provider for listing maps.
Automatic CleanupTemplate files are automatically removed from your child theme when the plugin is deactivated or uninstalled.

Copy to All

The “Copy to All” button appears below the Work Hours field on the Add Listing form, next to the “Open Maps” button (if Google Maps is available).

How It Works

1. Set the hours for one day (e.g., Monday) — choose a status like “Enter hours”, “Open all day”, “Closed all day”, or “By appointment only”, and fill in the time ranges if applicable.

2. Click “Copy to All”.

3. The button briefly shows “Copied!” as confirmation, and all other days are updated to match the current day’s configuration — including the status type and all time ranges.

This is especially useful when a business has the same hours every day. Set Monday once, copy to all, then adjust the one or two days that differ.

Note: “Copy to All” only copies from the currently active/visible day to all other days. It does not affect the day you’re currently viewing.


Google Maps Work Hours Picker

The “Open Maps” button opens an interactive Google Maps modal where you can find any business and copy its opening hours directly into the Work Hours field.

How to Use It

1. Click “Open Maps” on the Add Listing form.

2. A full-screen map modal opens. You can find a business in two ways:

Search: Type a business name or address in the search box at the top-left of the map. Select a result from the suggestions.

Click: Click directly on any business or point of interest on the map.

3. When a business is selected, an info window appears showing the business name, address, and its full weekly schedule.

4. Click “Copy to All” in the info window to copy those hours into the Work Hours field. The button shows “Copied!” as confirmation.

How Hours Are Mapped

Google Maps uses a different day numbering system than MyListing. The plugin automatically handles this conversion:

DetailHow It’s Handled
Day mappingGoogle’s day order (Sunday=0) is automatically converted to MyListing’s order (Monday=0).
Time roundingMyListing’s time selects use 15-minute intervals. Non-standard minutes (e.g., 9:07 AM) are rounded to the nearest quarter hour.
24-hour businessesDetected automatically and all days are set to “Open all day”.
Closed daysDays without opening data are set to “Closed all day”.
Split shiftsThe first time range for each day is copied. Additional shifts (e.g., lunch break closures) can be added manually using the “Add Hours” button.

My Location Button

A crosshair icon in the top-right corner of the map lets you quickly center the map on your current location, making it easy to find nearby businesses.


List View Mode

List view is an alternative layout for the Work Hours field that displays all seven days simultaneously in a compact vertical list, instead of the default tab-by-tab interface.

What Changes in List View

Standard Tab ViewList View
One day visible at a time via tab navigationAll seven days visible simultaneously
Radio buttons for day statusSelect2 dropdowns for day status
Time ranges below the status optionsTime ranges displayed inline next to each day
Add Hours button at the bottomInline add (+) and delete (×) buttons per day

List view is useful when you want a quick overview of all days at a glance, or when most days have simple hours that don’t need the full tab interface.

Enabling List View

1. Navigate to WordPress Admin → Listing Types and edit a listing type.

2. Go to the Fields tab and find (or expand) the Work Hours field.

3. Enable the “{CODICTS} MyListing Work Hours Pro – List View” toggle.

4. Save the listing type.

This is a per-field, per-listing-type setting. Different listing types can use different view modes for their Work Hours fields.

Note: List view only applies to the frontend Add Listing form. The WordPress admin post editor always uses the standard tab view.


Admin Settings

Navigate to “Work Hours Pro” in the WordPress admin sidebar to configure the Google Maps settings.

Force Google Maps

SettingBehavior
Disabled (default)The “Open Maps” button only appears if Google Maps is selected as the map provider in MyListing’s Theme Options → Maps.
EnabledThe “Open Maps” button always appears regardless of which map provider is selected in MyListing. Useful if you use Mapbox for your listing maps but still want the Google Maps work hours picker.

Google Maps API Key

Enter a dedicated Google Maps API key for the plugin. This key must have the following APIs enabled in the Google Cloud Console:

Maps JavaScript API — Required for rendering the map.

Places API — Required for searching businesses and retrieving their opening hours.

If left empty and “Force Google Maps” is enabled, the plugin will use your MyListing theme’s Google Maps API key as a fallback.


Auto-Close Map After Copying (Optional)

By default, the map modal stays open after you copy hours so you can continue browsing. If you’d like the modal to automatically close after copying, add this to your child theme’s functions.php:

add_filter( 'codicts-mylisting-work-hours-pro::auto-close-map', '__return_true' );

Why a Child Theme Is Required

The plugin works by copying modified versions of MyListing’s Work Hours field templates into your child theme. This is how MyListing’s template override system works — child theme templates take priority over parent theme templates.

On activation, two template files are copied into your child theme. On deactivation or uninstall, these files are automatically removed, restoring MyListing’s default Work Hours field behavior.

Warning: The plugin overwrites its template files in the child theme on activation and whenever the plugin is updated. Any manual customizations you make to these specific template files will be lost on plugin update. If you need persistent customizations, use WordPress hooks/filters instead of modifying the templates directly.


Frequently Asked Questions

Do I need a Google Maps API key?

Only if you want to use the Google Maps Work Hours Picker (“Open Maps” button). The “Copy to All” button works without Google Maps or any API key. If your MyListing theme already has a Google Maps API key configured, the plugin can use that automatically.

Can I use Mapbox for listing maps and Google Maps for the work hours picker?

Yes. Enable “Force Google Maps” in the Work Hours Pro settings. This adds the “Open Maps” button while keeping Mapbox as your main listing map provider.

Will deactivating the plugin break my listings’ work hours data?

No. Work hours data is stored in standard MyListing post meta. Deactivating the plugin only removes the template overrides from your child theme and disables the “Copy to All” and “Open Maps” buttons. All existing work hours data remains intact.

Does the list view work in the WordPress admin editor?

No. List view is frontend-only — the WordPress admin post editor always uses the standard tab view.

How does the plugin handle businesses with split hours?

When copying from Google Maps, the first time range for each day is copied. If a business has split hours (e.g., 9 AM–12 PM and 2 PM–5 PM), the first range is captured and additional shifts can be added manually with the “Add Hours” button.

What happens if I switch themes?

The plugin checks for MyListing and a child theme on every page load. If either is missing, the plugin displays an error notice and does not load its functionality. Template files are tied to the specific child theme they were installed into.

Is the plugin translatable?

Yes. A .pot translation template is included in the /languages/ directory. Translatable strings include all button labels and error messages.


Troubleshooting

“MyListing Theme Not Detected” Error

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

“MyListing Child Theme Not Detected” Error

A MyListing child theme must be active. The plugin cannot function with only the parent theme because it needs to copy template override files into the child theme directory.

“Open Maps” Button Not Appearing

CauseSolution
Google Maps not selected as map providerEither select Google Maps in MyListing Theme Options → Maps, or enable “Force Google Maps” in the Work Hours Pro settings.
No API key configuredEnter a valid Google Maps API key in the Work Hours Pro settings, or ensure your MyListing theme has one configured.
Required APIs not enabledEnsure Maps JavaScript API and Places API are both enabled in the Google Cloud Console for your API key.
API key restrictionsCheck the browser console for Google Maps errors like RefererNotAllowedMapError. Your API key’s HTTP referrer restrictions may be blocking your site.

“Copy to All” Button Not Appearing

CauseSolution
No Work Hours field on the pageThe button only appears on pages with a Work Hours field. Verify the listing type has a Work Hours field configured.
JavaScript error on the pageCheck the browser console for errors that may prevent the plugin’s scripts from running.
Template files not installedDeactivate and reactivate the plugin to force the template files to be re-copied into your child theme.

Hours Copied from Google Maps Don’t Match Exactly

CauseSolution
Minute roundingMyListing’s time selects use 15-minute intervals. Non-standard times (e.g., 9:07 AM) are rounded to the nearest quarter hour (9:00 AM). Adjust manually if needed.
Split shifts not fully capturedOnly the first time range per day is copied from Google Maps. Use the “Add Hours” button to manually add additional ranges.
Business has no opening hours dataNot all businesses on Google Maps have opening hours listed. If the info window doesn’t show a schedule, the business doesn’t have hours data in Google’s system.

List View Not Displaying

CauseSolution
Toggle not enabledEdit the listing type, expand the Work Hours field, and enable the “{CODICTS} MyListing Work Hours Pro – List View” toggle.
Viewing in WP adminList view is frontend-only. The admin post editor always uses the standard tab view.
Template files outdatedDeactivate and reactivate the plugin to force a template refresh.

Template Files Not Installing or Updating

CauseSolution
File permission issuesEnsure WordPress has write access to your child theme directory.
Stale version trackingDeactivate and reactivate the plugin to force a fresh template installation.

Template Files Remain After Deactivation

The plugin should automatically remove its template files from your child theme on deactivation. If they remain (due to file permissions), manually delete includes/src/forms/fields/work-hours-field.php and templates/add-listing/form-fields/work-hours-field.php from your child theme folder.


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

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