1. Home
  2. ReHub Theme
  3. Configuring Locators

Configuring Locators

For most of locators functions we use one of best Geo plugins for wordpress – Geo My WordPress

What you can do with plugin? There are some examples

  1. Add location to your products, so, buyers can search products in their area
  2. Add location to stores, so, buyers can search stores in their area
  3. Add location to directory posts.
  4. Auto detection of user location (based on google map API)

After installing plugin, you need to enable extensions in Geo My WP – Extensions: Post Locator if you need locators for directory or products, Member Locator if you need store/user locator, and Single Location (for both). Member Locator works only with Buddypress, so, if you need Store Locator you must also have enabled Buddypress plugin on site, because Stores in all multivendor plugins are based on Members.

Then, go to Geo My WP – settings and add your own Google API keys and Post types (if yo need Post locator)

Please, note, if you want to make auto detection of user location, your site must be on https:// (ssl), because google requires this for auto detecting of user location

Form Setup

Next thing, you need to create form for Member locator (if you need store or user locator) or for Post Locator if you need locator for directory posts or products.

In form settings, one thing which you need to understand is that plugin has two areas: Form and Results. In Form – you set how plugin will show locator form when page is loaded. On Results – you can configure how plugin will show results after user click on Search button. Lets’ check each setting tab. They are both the same for Post locator and Member Locator with only some differences

Page Load Results

On this setting tab I usually change only two options:

 Enable Page Load Features  – this option enable displaying results before searching. This means that you will see all available results before searching. If you want to show only form on one page (for example, on homepage) and then show search results on another page – disable this option. With this option, you should also enable option  Display list of results  and  Display Map  to show also map before results.

Also, you can choose in this page Post types which you want to include, initial position of map, units and other things which are optional

Search Form

Here, you can choose how to show form design

 Search Form Template choose here design of form. Our theme has custom forms for plugin to give you best results. All theme’s forms have name which starts from Custom:

Don’t use default form design as they don’t fit with theme

 Taxonomies  or  Xprofile Fields 

Here you can choose to show categories in form. If you use Product Locator, you can choose here all global attributes which you can create in Products – Attributes. Also you can choose categories. For Member Locator you can choose Xprofile fields (it’s the same as categories, but for users/stores). You can read how to use Xprofile fields in article If you are interesting in advanced using of Buddypress with theme, you can check our article about Buddypress

When you use member locator and Xprofile fields, you can choose design of form with xprofile fields (which will be all visible in form) or without Xprofiles (in this case, Xprofile fields will be visible only on clicking button “show options”)

 Address Field 

Here you can choose how to show address field. Usually I enable Address Autocomplete and Locator Button checkbox and nothing more.

 Locator Button 

Make it as empty, because locator icon is already enabled in previous option

Then, you can also choose units and other things which are optional

Form Submission

In this setting you can choose what will happen when user click on Submit button.

 Results Page  – you can choose “same page” which is default option, then, results will be available on the same page. You must also choose to show results and map in Page Load Setting which we described above. If you want to show results on separate page, choose page from dropdown. Then, on this page, you must have two shortcodes in content. Example

[gmw map=3]

[gmw form="results"]

In map=3 you should place Id of your form. You can see ID of your form in Geo My WP – Forms. Making results page as separate page can give you more control how to show results, because you can wrap shortcodes in different design containers, see details below for some examples

Also, On this settings I recommend you to enable Display list of results and Display Map

Search Results

Here you can choose template for results

As in previous step, you should choose templates which have  “Custom:”  in name. We added several templates. Some templates have 3 col or 4 col. It’s made because you can use Search results and Locators on Full width page or on page with sidebar, so, full width pages are better with 4 columns

All other options on this setting page will be ignored in theme’s templates, because we have custom output. Only one option which you can enable is  Directions Link 


You can choose how to show map and it’s height. All is optional, you can leave as is

Form Usage

On this page you can copy shortcodes which you will use on pages to generate forms. Let’s see what we can use

How to Assign location

Post, product location can be added directly in Post and Product by admin. You can find special section for this in post.

Frontend Submit for Location

If you use any type of Frontend Submit with our RH Frontend PRO plugin, you can synchronize map field of plugin and GMW. For this, add custom field to frontend form and set it’s key name as



Set also this type of key as Address field


To make map field working as expected, you must add also google map API keys in settings of plugin


Auto Assign Location based on Member Location

This is one of useful function which we added to theme. If your user has Location in Member Location and submit product, you can enable auto assign of his location to post/product location. So, all his products will be marked with his location and he doesn’t need to add location to products each time. This is also useful when you have multi vendor site and you want to make Product Locator.

To enable this option – go to  Theme option  Shop settings  –  Synchronize product and user location? 

Member Location

All users can add own location inside their Profile of Buddypress. Don’t forget that you must have Member Locator Extension and Buddypress

Vendor Location

If you use one of supported Vendor plugin (WC Vendor, Dokan or WC Marketplace), vendors can assign location also inside their vendor dashboard, so, they don’t need to go to User profile for this. It’s useful because vendors can set everything from one dashboard. You can see vendor setup guide

Each vendor plugin has own fields for location, so, logic is a different for each plugin

WC Vendor free –  you must customize page of settings. You can check setting page in Wc Vendor – Pages. Then, edit this page and insert before WCV shortcode next shortcode


This will add location form before settings

WC Vendor PRO – you don’t need any special setup. Theme will add locator form in vendor dashboard

Dokan – Dokan has Map selection inside vendor dashboard. If he choose location, theme will synchronize it also with GMW plugin. Important thing – Dokan has also text fields for address. These fields are just text, they will be visible in his profile as text, but not as map location. Only Map select will add real Location data to vendor

WC Marketplace – This plugin has only text field for address. if he submit own address as text, theme will try to geocode this address and will save data on success or location will be empty if google can’t geocode address

You can also show locator submit form on site to any page with shortcode


Synchronize Vendor Location to his Products

If you want to add locations to Products of vendor when he submit product, you can enable automatic synchronization. Read how to do this

Usage of Locator Forms

After setting form, you can copy shortcode and place it on page. Usually, I use form shortcodes in content of page or in sidebar. Let’s see some examples

Using form and results on the same page


Here we use Display map and results on the same page in form settings. We use Custom: Simple form template and Custom: Lists. Then, we copy shortcode of form, create simple page and place there shortcode. This is basic locator and very simple to use

Using form on home page and results on separate page


We created custom home page, made it as Page for layout builder and used Visual Composer row with Custom headings. Check docs for page builder

You can easily insert this ready row template in your page with ready templates You will find several ready templates (Elements: Top search area 1, 2, 3). You can place them on page and remove search module. Instead of it, add text module and add GMW form shortcode inside.

Then, in settings of GMW form we set to show results on another page. We created new page and placed there two shortcodes: map and results

[gmw map=3]

[gmw form="results"]

As you see, I disable page load features and use big fields form template.

Advanced examples of search page

We also created some advanced examples how you can use GMW on page

Demo 1

Demo 2

In first demo, I use the same way as in previous, but, I also added Map shortcode directly to row with background. To do this, you must disable showing results in GMW Page Load setting and enable map only by shortcode

As you see, this way give me ability to use map separately from form. I can add custom margins in this case or place map even in another row with another background. I also enabled to show results on separate page, so, when you search users on demo 1, you will see that results will be on demo 2 page

For Demo 2, I used simple two shortcodes: map and form on page

In settings of Form, I enabled to show results within form and map as separate shortcode

This way gives me option to show map first, then form and assign results below form

If you want to wrap form with such good dark block, add next code here

div.gmw-form-wrapper {
    padding: 45px 25px 35px 25px !important;
    background: #666 !important;
    box-shadow: 0 10px 20px #ccc !important;

If you want to move form block directly on map, you can set negative 100 margin in options of Text module where you placed form shortcode


How to show map inside Post

If you added location to post or Product, you can also display map inside post. GMW has next shortcode for this

[gmw_single_location map="1" map_width="100%" map_height="450px" additional_info="0" directions="0"]

Place it in global areas inside Post (Theme option – ads option) or with help of WPSM Specification plugin.

For Products, I recommend to use plugin for Custom tabs and add map inside tabs