Restrict opening hours to categories and add multiple schedules

Hi,

A couple of requests re ‘Opening hours’ extension:

  • Make it category specific, so we can enable it for certain categories, and disable it for others.
  • Allow users to add several opening times per day - for instance, open from 08.00 to 14.00 and from 16.00 to 20.00.

Unfortunately there’s no easy way to add multiple schedules yet, but restricting opening hours to specific categories is possible with a custom code snippet - let me know if this works for you and I’ll share it.

1 Like

That’s great, thanks. Please do share the custom code snippet.

Hi,

If understand you correctly, please try this PHP snippet Enable opening hours for specific listing categories only #hivepress #opening-hours · GitHub
Please use the Code Snippets plugin to add and manage custom PHP code snippets Code Snippets – WordPress plugin | WordPress.org

1 Like