MetaLocator includes the ability to indicate the "open" or "closed" status of a location based on the hours provided.  This can be displayed by the use of a few special template tags.

  • {todayhours}.  This displays the hours for the current day in a textual format, as in "Open today from 9 to 5".  It also includes when the location is open next, if it is currently closed, or if it is closing soon.  "Soon" is defined as less than 1 hour.
  • {locationrtstatus}.  This displays "Open" or "Closed".  It's default styling includes a green or red font color, respectively.

Update: {locationrtstatus} replaces {locationstatus} and now uses javascript to display the location's status in real time.  This avoids issues where caching or a left-open browser window might display the location as closed when it has since opened.

These status indicators correctly consider the location's time zone, which is obtained during the geocoding process.

Include these template tags as needed according to the instructions found here.

To modify the language associated with these tags, the following constants are used:

LOCATOR_HOURS_STATUS_OPEN_RANGE="Open today from %1$s to %2$s"

To edit or add these language constants, see this tutorial.

Did this answer your question?