Opening Hours Shortcode For Local Business Schema In WordPress
The [wpt_schema_local_business_opening_hours /] shortcode displays your business operating hours anywhere on your website, populated dynamically from your Local Business Schema data.
Display business opening hours on any WordPress page or post using the shortcode.
Pre-Requisites
Section titled “Pre-Requisites”- A WordPress Website (5.0 or higher)
- Divi Theme or Divi Builder (optional, for Divi Modules)
- WordPress Schema Plugin For Divi, Gutenberg & Shortcodes
Setup Local Business Schema For Your Website
Section titled “Setup Local Business Schema For Your Website”
-
Configure a Local Business Schema profile for your website.
-
For step-by-step instructions, refer to the Local Business Schema Guide.
FREE DOWNLOAD
Start your FREE trial. No credit card required.
Shortcode Parameter Reference
Section titled “Shortcode Parameter Reference”
-
The [wpt_schema_local_business_opening_hours /] shortcode supports the following customization attributes:
-
- css_id: Custom CSS ID assigned to the opening hours container element (default:
wpt-schema-local-business-opening-hours). - css_classes: Custom CSS classes added to the container element.
- post_id: The ID of the post or page containing the business location data. Omit this attribute to use the current page automatically.
- 24_hour_format: Time display format. Set
1for 24-hour format (e.g., 14:00),0for 12-hour AM/PM format (e.g., 2:00 PM, default:0). - hide_closed: Hide days when the location is closed for business. Set
1to hide closed days,0to display them (default:1). - show_days: A comma-separated list specifying which days to display and their display order (default:
monday,tuesday,wednesday,thursday,friday,saturday,sunday). - Sample Usage:
[wpt_schema_local_business_opening_hours css_id='wpt-schema-local-business-opening-hours' css_classes='' post_id="" 24_hour_format="0" hide_closed="1" show_days="monday,tuesday,wednesday,thursday,friday,saturday,sunday" /]
- css_id: Custom CSS ID assigned to the opening hours container element (default:
FREE DOWNLOAD
Start your FREE trial. No credit card required.