All shortcodes

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

[mbhi location="your location name" format="12" includeday="true"]

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.
includetime true, false Whether or not to include the current time in the output.
includeday true, false Whether or not to include the current day in the output.
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 A 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 A number Time to start showing the message, in minutes before closing time.

 2. Display your opening times: [mbhi_hours]

Example:

[mbhi_hours location="your location name" format="24" display="consolidated" output="table"]

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.

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

Example

[mbhi_ifopen location="your location name"]
   Your text or HTML content goes here.
[/mbhi_ifopen]

Note

The location attribute is obligated.

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

Example

[mbhi_ifclosed location="your location name"]
   Your text or HTML content goes here.
[/mbhi_ifclosed]

Note

The location attribute is obligated.