Google Maps "Store Locator Shortcode" Using Local Business Schema Data In WordPress

The [wpt_schema_local_business_store_locator /] store locator shortcode shows business listing on Google Maps.

It uses data from the Local Business Schema.

A simple way for customers to locate your business on Google Map using the wpt_schema_local_business_store_locator shortcode

Pre-requisites

  1. A WordPress website
  2. WordPress Schema Plugin plugin

Tools

  1. Computer

Total Duration : 5 minutes

FREE DOWNLOAD

Start your FREE trial. You can cancel your trial anytime within the trial period.

Step 1 - Setup Local Business Schema For Your Website

Setup Local Business Schema For Your Website
  1. Setup a Local Business Schema profile for your website.
  2. Ensure you have setup the Google Maps API Key and have enabled Google Places API.
FREE DOWNLOAD

Start your FREE trial. You can cancel your trial anytime within the trial period.

Step 2 - Shortcode Documentation

Shortcode Documentation
  1. [wpt_schema_local_business_store_locator /] shortcode has the following attributes
    • css_classes
      • CSS classes of the main wrapper element of the shortcode html
    • oneline
      • Whether to show address in single line or multi-line.
      • 1 for single line address
      • 0 for multi-line address
      • Default value is 0
    • width
      • Set the width of the map.
      • You need to supply the units. For example 400px, 100% etc
      • Default value is "400px"
    • height
      • Set the height of the map.
      • You need to supply the unit. Unit accepted is px
      • Default value is "300px"
    • map_style
      • Set the map type.
      • Available values are
        • roadmap
        • satellite
        • hybrid
        • terrain
      • Default value is "roadmap"
    • scrollable
      • Whether the map is scrollable or not
      • 1 means scrollable. 0 stops scroll
      • Default value is "0"
    • draggable
      • Whether the map is draggable or not.
      • 1 makes the map draggable. 0 stops map drag.
      • Default value is "0"
    • zoom_control
      • Whether to show zoom control on map or not.
      • 1 shows the zoom control. 0 hides it.
      • Default value is 1
    • restrict_search_by_countries
      • Restrict auto-complete location list in the location search input box
      • Comma-separated list of 2-character country codes
      • Default is empty. Auto-complete location can come from any country.
    • distance_unit
      • The unit to use for the radius search
      • Values are
        • km
        • mile
      • Default is km
    • radius_values
      • Comma-separated list of radius values.
      • Used in dropdown for the radius search.
      • Default value is 1,5,10,25,50,100,250,500,1000
    • radius
      • The default radius value
    • cluster_markers
      • Whether to show a group of markers in proximity as a cluster or not.
      • Value 1 shows a cluster when markers are in proximity
      • Value 0 never shows a cluster
      • Default is 0
    • show_opening_hours
      • Show opening hours in
        • Location text listing
        • Location info window if show_info_window is 1
      • Value 1 shows while 0 hides opening hours
      • Default value is 0
    • hide_closed
      • Show the days when the location is close for business.
      • Set 1 to hide and 0 to show the day.
      • Default value is 1
    • show_info_window
      • Whether to show the marker/pin information window when clicked.
      • 1 shows the information window on click. 0 doesn't show information window.
      • Default value is 1
    • show_business_name
      • Whether to show business name above address text or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_street_address
      • Where to show street address or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_locality
      • Whether to show locality in the address or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_postal_code
      • Whether to show postal code in the address or not
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_state
      • Whether to show state in the address or not
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_country
      • Whether to show country in the address or not
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_phone
      • Whether to show the telephone number or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_fax
      • Whether to show the fax number or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_email
      • Whether to show the email address or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_url
      • Whether to show the URL or not
      • Set 1 to show and 0 to hide.
      • Default value is 0
    • show_vat
      • Whether to show the VAT ID or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_tax
      • Whether to show TAX ID or not
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_business_name
      • Whether to show business name or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • show_route
      • Whether to show route/driving direction link or not.
      • Set 1 to show and 0 to hide.
      • Default value is 1
    • dequeue_scripts
      • Themes like Divi, enqueue Google Map API script which interferes with this shortcode.
      • To make this shortcode work, remove these scripts.
      • Pass a comma-separated list of WordPress script handles names of the such scripts.
      • For Divi, the name of the handle is 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. You can cancel your trial anytime within the trial period.