The plugin’s main functionality is usually accessed through shortcodes. Below is a list of all the codes you can use.

1. Display if you’re now open/closed, or are about to open/close: [mbhi]

Example

Note

The location option is mandatory. All other options are optional. Without options, this shortcode will use the settings as configured in the Incidactor options tab of the plugin settings page.

Options

 

Attributes Possible values Description
location Anything The name of the location you want to display the opening hours for. This is the same name as set under the ‘Locations & hours’ tab.
format 12, 24 Display times in 12-hour or 24-hour format.
openmessage Anything The message to display when you’re currently open.
closedmessage Anything The message to display when you’re currently closed.
approximation true, false Display an alternate message when it’s near opening/closing time.
openingsoonmessage Anything The message to display when almost opening. Use {x} to denote minutes.
openingsoonmessagetime Number Time to start showing the message, in minutes before opening time.
closingsoonmessage Anything The message to display when almost closing. Use {x} to denote minutes.
closingsoonmessagetime Number Time to start showing the message, in minutes before closing time.
show_specialdate_messages True, false Whether or not to show alternative messages on special dates.
specialdate_message_open Anything The message to display when today is a special date and you’re currently open.
specialdate_message_closed Anything The message to display when today is a special date and you’re currently closed.
from A date (example: December 3) If you’re using a location for seasonal hours, you can use ‘from’ to set when to start displaying the indicator.
to A date (example: February 18) If you’re using a location for seasonal hours, you can use ‘to’ to set when to stop displaying the indicator.

 2. Display your opening times: [mbhi_hours]

Example:

Note

The location option is mandatory. All other options are optional. Without options, this shortcode will use the settings as configured in the Table options tab of the plugin settings page.

Options

Attributes Possible values Description
location Anything The name of the location you want to display the opening hours for. This is the same name as set under the ‘Locations & hours’ tab.
format 12, 24 Display times in 12-hour or 24-hour format.
display consolidated, normal Whether or not to consolidate days with the same opening hours into 1 line. This could render something like Monday - Friday — 9AM - 5PM
output table, inline Display the opening hours in a table or inline.
includevacations true, false Whether or not to include vacation days in the output.
includeholidays true, false Whether or not to include holiday opening hours in the output.
consolidationseparator -, —, space, |, , The symbol between the day names. This option is only relevant when display is set to consolidated. Example: Monday | Friday. The pipe character (“|”) is the separator.
hourseparator -, —, |, space, , The symbol between hours. Example: 10AM 10PM, where the emdash (“—”) is the separator.
entryseparator -, —, |, space, , The symbol between opening hours. This option is only relevant when output is set to inline. Example: Monday 1AM – 2PM, Tuesday 1AM – 2PM. Where the comma is the separator.
mhbr true, false Add a line break between hour slots on the same day. Only relevant when output is set to table.
abbreviatedays true, false Abbreviate the days. Monday becomes Mon. This option works in all the plugin’s translated languages.
showonlytoday true, false Show only today’s opening times.
dates_in_past true, false Whether or not to show holidays & special dates that are in the past.
replace_with_specials true, false Overwrite the week’s normal opening hours with special dates if they are overlapping.
special_date_format date, name, date and name, name and date Choose how to display special dates.

3. Show only vacations: [mbhi_vacations]

Example

Note

The shortcode takes the same attributes as [mbhi_hours].

4. Show only special dates: [mbhi_specials]

Example

Note

The shortcode takes the same attributes as [mbhi_hours].

5. Print SEO output: [mbhi_seo]

Example

6. Show content only when your business is open: [mbhi_ifopen]

Example

Note

The location attribute is obligated.

7. Show content only when your business is closed: [mbhi_ifclosed]

Example

Note

The location attribute is obligated.