Business hours are a predefined field in GeoDirectory. Add the field to your post type and a business hours section appears on the add listing form.
Add the field
- Go to Places > Settings > Custom Fields (or the same screen for another post type).
- In the Predefined Fields list, click Business Hours.
- Make sure the field is set to active, then save.
Enter the hours on a listing
On the add listing form, and when editing a listing in the backend, the Business Hours field starts with a Yes / No choice. The days of the week only appear after you choose Yes. Then for each day you can:
- set the opening and closing time
- tick Open 24 hours
- click the plus icon to add a second set of hours, for example for a lunch break
- remove the hours to mark the day as closed
Below the days there is a Timezone setting. With Google Maps it is filled in from the listing’s location. How to set Business Hours and Time Zone explains how the time zone is chosen.
If you want Yes to be selected by default, use the snippet in How to set business hours to YES by default.
Show the hours
The hours show on the listing details page by default. In your own templates, use [gd_post_meta key='business_hours']. With Advanced Search you can also let visitors filter by listings that are open now, see How to Filter Listings by “Open Now”?.