Widget location search for WordPress

Copy the following code and paste it at the widget area of your WordPress Theme or Visual Composer, WP Bakery, Elementor within HTML or Code Block..

<form action="https://superstorefinder.net/superstorefinderwp/" method="get"><input class="form-control" id="ssfboxsearch" name="boxsearch" type="text" placeholder="Search Zip or Address" /> <button class="btn btn-default" type="submit">Go</button></form>

Notice: From the code above, edit action=”https://superstorefinder.net/superstorefinderwp/” to your store locator url path

Widget location search for WordPress

You can try to search zip or address in below searchbox location widget.

To add autocomplete in your search widget, ensure that id=”ssfboxsearch” is present in your search input HTML code or simply paste HTML code below in your Widget, Visual Composer, WP Bakery, Elementor within HTML or Code Block. (This can only be done in version 6.3)

<form action="https://superstorefinder.net/superstorefinderwp/" method="get"><input class="form-control" id="ssfboxsearch" name="boxsearch" type="text" placeholder="Search Zip or Address" /> <button class="btn btn-default" type="submit">Go</button></form>

Then, go to admin settings page, set Load Plugin Asset to All pages

load-plugin-assets-all-pages-search-widget-autocomplete

Once loaded, your search field will automatically be added with Google autocomplete.

search-widget-with-autocomplete-ssf

You can select Google Map Region in admin settings page to World Wide (Globally) or specific region only which the autocomplete will limit only addresses / locations within that particular region.

search-widget-autocomplete-selective-region

You can also pass location or lat / lng parameter to your store locator map

For example

https://yourwebsite.com/storelocator/?location=New York

or

https://yourwebsite.com/storelocator/?lat=40.730610&lng=-73.935242
14+

Users who have LIKED this post:

  • Sofia Moss