Skip to content

Google Map Shortcode For Local Business Schema In WordPress

The [wpt_schema_local_business_map /] shortcode embeds an interactive Google Map displaying your physical business location, populated dynamically from your Local Business Schema data.

Display your business location on Google Maps anywhere on your WordPress site 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.

  3. Ensure you have entered a valid Google Maps API Key in plugin settings.

FREE DOWNLOAD

Start your FREE trial. No credit card required.

Shortcode Documentation

  1. The [wpt_schema_local_business_map /] shortcode supports the following customization attributes:

    • css_classes: Custom CSS classes added to the map 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.
    • oneline: Address formatting style. Set 1 for single-line inline address, 0 for multi-line formatting (default: 0).
    • width: Map container width including units (e.g., 100%, 400px, default: 400px).
    • height: Map container height in pixels (e.g., 300px, default: 300px).
    • zoom: Map initial zoom level (default: 14). Higher numbers zoom closer; lower numbers zoom out.
    • map_style: Google Map tile style. Supported values: roadmap, satellite, hybrid, terrain (default: roadmap).
    • scrollable: Enable or disable mouse scroll wheel zooming. Set 1 to enable, 0 to disable (default: 0).
    • draggable: Enable or disable mouse map dragging. Set 1 to enable, 0 to disable (default: 0).
    • show_info_window: Display location info window when clicking the map marker pin. Set 1 to enable, 0 to disable (default: 1).
    • show_street_address: Show or hide street address in info window. Set 1 to show, 0 to hide (default: 1).
    • show_locality: Show or hide city/locality in info window. Set 1 to show, 0 to hide (default: 1).
    • show_postal_code: Show or hide postal/zip code in info window. Set 1 to show, 0 to hide (default: 1).
    • show_state: Show or hide state/region in info window. Set 1 to show, 0 to hide (default: 1).
    • show_country: Show or hide country in info window. Set 1 to show, 0 to hide (default: 1).
    • show_phone: Show or hide telephone number. Set 1 to show, 0 to hide (default: 1).
    • show_fax: Show or hide fax number. Set 1 to show, 0 to hide (default: 1).
    • show_email: Show or hide email address. Set 1 to show, 0 to hide (default: 1).
    • show_url: Show or hide business URL. Set 1 to show, 0 to hide (default: 0).
    • show_vat: Show or hide VAT ID. Set 1 to show, 0 to hide (default: 1).
    • show_tax: Show or hide Tax ID. Set 1 to show, 0 to hide (default: 1).
    • show_business_name: Show or hide business name heading. Set 1 to show, 0 to hide (default: 1).
    • show_route: Show or hide “Get Directions” link. Set 1 to show, 0 to hide (default: 1).
    • dequeue_scripts: Certain themes (such as Divi) load duplicate Google Maps API scripts that can conflict with shortcode map rendering. Pass a comma-separated list of conflicting WordPress script handles to unregister them (for Divi, use google-maps-api).
    • Sample Usage:
      • [wpt_schema_local_business_map css_classes="" post_id="" width="400px" height="300px" zoom="14" map_style="roadmap" scrollable="0" draggable="0" show_info_window="1" show_route="1" show_vat="0" show_tax="0" show_business_name="1" oneline="1" show_street_address="1" show_locality="1" show_postal_code="1" show_state="1" show_country="1" show_url="1" show_email="1" show_phone="1" show_fax="1" dequeue_scripts="" /]

FREE DOWNLOAD

Start your FREE trial. No credit card required.