fbpx

Shortcode

Table of Contents

The Business Hours component can be used with the shortcode:

[st_wc_awesome_business_hours]

By default all days are open from 8:00AM to 5:00PM. Settings that can be added to the shortcode manually or by updating an option over at the admin panel:

  • <day>
    • Business hours for <day> i.e. sunday
    • Must be an opening hour, a closing hour and a boolean flag indicating closed. 24 hour format is allowed, just make sure that all 3 args are separated by a single comma.
    • DEFAULT: 8:00AM,5:00PM,
      • Note that we just need the comma after the closing hour to indicate that it’s not closed.
  • format24hour
    • Enable 24 hour format
    • Can be a boolean value (‘true’, ‘false’, ‘yes’, ‘no’)
    • DEFAULT: ‘false’
  • dense
    • Reduce component height
    • Can be a boolean value (‘true’, ‘false’, ‘yes’, ‘no’)
    • DEFAULT: ‘false’
  • current-day-only
    • Display current day only
    • Can be a boolean value (‘true’, ‘false’, ‘yes’, ‘no’)
    • DEFAULT: ‘false’
  • highlight-current
    • Highlight current day with color
    • Can be a boolean value (‘true’, ‘false’, ‘yes’, ‘no’)
    • DEFAULT: ‘false’
  • highlight-style
    • Determine highlight style
    • Can be either ‘light’ or ‘dark’
    • DEFAULT: ‘light’
  • highlight-color
    • Highlight background color
    • Can be a valid HEX color
    • DEFAULT: #f00000

Example #

Here we have an example of an entity that is closed on weekends

[st_wc_awesome_business_hours
sunday=”08:00AM,05:00PM,1″
monday=”08:00AM,05:00PM,”
tuesday=”08:00AM,05:00PM,”
wednesday=”08:00AM,05:00PM,”
thursday=”08:00AM,05:00PM,”
friday=”08:00AM,05:00PM,”
saturday=”08:00AM,05:00PM,1″]

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *