Google Maps Store Locator Shortcode Using Local Business Schema Data In WordPress
The [wpt_schema_local_business_store_locator /] shortcode embeds an interactive Google Maps store locator, allowing customers to search and filter physical business locations based on your Local Business Schema data.
A simple way for customers to find nearby store locations, search by address or radius, and get directions.
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 setup details, refer to the Local Business Schema Guide.
-
Ensure you have entered a valid Google Maps API Key and enabled the Google Places API in your Google Cloud Console.
FREE DOWNLOAD
Start your FREE trial. No credit card required.
Shortcode Parameter Reference
Section titled “Shortcode Parameter Reference”
-
The [wpt_schema_local_business_store_locator /] shortcode supports the following customization attributes:
-
- css_classes: Custom CSS classes added to the store locator container element.
- oneline: Address display format in location cards. Set
1for single-line inline address,0for 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.,
400px, default:300px). - map_style: Google Map tile style. Supported values:
roadmap,satellite,hybrid,terrain(default:roadmap). - scrollable: Enable mouse scroll wheel zooming. Set
1to enable,0to disable (default:0). - draggable: Enable mouse map dragging. Set
1to enable,0to disable (default:0). - zoom_control: Display map zoom controls (+/- buttons). Set
1to show,0to hide (default:1). - restrict_search_by_countries: Restrict search autocomplete to specific countries using comma-separated ISO 2-character country codes (e.g.,
us,ca). - distance_unit: Distance unit for radius search dropdowns. Supported values:
kmormile(default:km). - radius_values: Comma-separated list of search radius options (default:
1,5,10,25,50,100,250,500,1000). - radius: Initial default search radius value.
- cluster_markers: Group nearby location markers into visual clusters when zoomed out. Set
1to enable clustering,0to disable (default:0). - show_opening_hours: Display operating hours in search results listings and marker info windows. Set
1to show,0to hide (default:0). - hide_closed: Hide days when the location is closed for business. Set
1to hide closed days,0to display them (default:1). - show_info_window: Display location detail window when clicking a map pin. Set
1to show,0to hide (default:1). - show_business_name: Display business name heading. Set
1to show,0to hide (default:1). - show_street_address: Show or hide street address. Set
1to show,0to hide (default:1). - show_locality: Show or hide city/locality. Set
1to show,0to hide (default:1). - show_postal_code: Show or hide postal/zip code. Set
1to show,0to hide (default:1). - show_state: Show or hide state/region. Set
1to show,0to hide (default:1). - show_country: Show or hide country. Set
1to show,0to hide (default:1). - show_phone: Show or hide telephone number. Set
1to show,0to hide (default:1). - show_fax: Show or hide fax number. Set
1to show,0to hide (default:1). - show_email: Show or hide email address. Set
1to show,0to hide (default:1). - show_url: Show or hide business website URL. Set
1to show,0to hide (default:0). - show_vat: Show or hide VAT ID. Set
1to show,0to hide (default:1). - show_tax: Show or hide Tax ID. Set
1to show,0to hide (default:1). - show_route: Show or hide “Get Directions” link. Set
1to show,0to 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_store_locator css_classes="" width="100%" height="400px" map_style="roadmap" scrollable="1" draggable="1" zoom_control="1" restrict_search_by_countries="" distance_unit="km" radius="" radius_values="1,5,10,25,50,100,250,500,1000" cluster_markers="0" show_opening_hours="0" hide_closed="1" 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.