Directory locations

There are 3 ways to provide locations functionality on directory site:

  1. Use predefined locations - this way users are able to use previously defined locations for their listings. Autocomplete on addresses fields and "Get my location" button on addresses fields should be disabled in advanced settings. So addresses fields will be used by users to manually fill in streets, buildings, postal codes, e.t.c. Visitors will search listings only by previously defined locations drop-down menu. Actually radius search is not necessary in this method.
  2. Use addresses fields - do not need to insert predefined locations. Users will use only addresses fields, autocomplete function and "Get my location" button on addresses fields can help them. Listings addresses fields (address line 1, address line 2, zip code) should contain whole information about country, state, city, region, streets, buildings, postal codes e.t.c. To get correct search results with nearby locations it is quite recommended to enable search by radius and set up default radius value in the search forms.
  3. Both methods (default) - usage of predefined locations + addresses fields. But in this case information in addresses fields may contain country, state, city, region, the same as selected predefined locations. It is recommended to exclude locations levels from address line.

Some additional explanation about plugin's search engine and its fields here.

Predefined locations

Site admin may create/edit/delete special predefined locations items. Management of directory locations tree has exactly the same functionality as standard WordPress categories, but these are separate items and have special administration page "Directory listings -> Directory locations"

Directory locations might have custom icons. Default icons files are placed in "resources/images/locations_icons/" folder of the plugin. Site administrator can upload custom icons into "w2dc-plugin/resources/images/locations_icons/" folder of your child theme using Files manager of hosting control panel or via FTP.
But the plugin can use only one folder for icons: native folder or custom folder in your child theme when exists.

[webdirectory-locations] shortcode has a bunch of parameters. By default it allows to build nice looking table. Location image selected in location settings is used as a background of root locations.

After locations levels were successfully configured and locations tree completed - users may select any predefined location from select boxes group on create/edit listing page.

Listings levels have an option to allow users to select more than 1 location for each listing.

Locations levels

Just in some words, locations levels - these are names of nesting levels of directory locations tree. By default there are 3 locations levels: Country, State and City. Site admin can manage locations levels and exclude any of them from address strings. Also it is possible users can add new locations at the frontend submission form, "Add Country", "Add State" e.t.c. links appear below locations dropdowns.

"Directory Admin -> Locations levels" page

When your maps site will be used locally, for example, for visitors from one country or one state/region - do not delete unnecessary locations levels and predefined locations, they are required to set correct location point at the Google map during listings creation/edition. You can just exclude needed locations levels from address line - there is "In address line" option for each locations level, it allows to build custom address line at the frontend. See examples:

Also when you set up local maps site - it is recommended to fill in "Default country/state for correct geocoding" setting.