Skip to content

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.

Setup Local Business Schema For Your Website

Section titled “Setup Local Business Schema For Your Website”

Setup Local Business Schema For Your Website

  1. Configure a Local Business Schema profile for your website.

  2. For step-by-step instructions, refer to the Local Business Schema Guide.

FREE DOWNLOAD

Start your FREE trial. No credit card required.

Shortcode Documentation

  1. 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 1 for 24-hour format (e.g., 14:00), 0 for 12-hour AM/PM format (e.g., 2:00 PM, default: 0).
    • hide_closed: Hide days when the location is closed for business. Set 1 to hide closed days, 0 to 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" /]

FREE DOWNLOAD

Start your FREE trial. No credit card required.