WPRentals Theme Documentation WPRentals Theme Documentation

  • Client Support
  • Video Tutorials
  • WPRentals
  • WPEstate
  • API
Home / Property / Listing / City, Neighborhood, and Country – Listing Location Options for the Submission Form

City, Neighborhood, and Country – Listing Location Options for the Submission Form

10422 views

Overview

WPRentals offers several ways to manage location fields for search and listing submission.

You can choose between:

  • Google Places Autocomplete
  • OpenStreet Places Autocomplete
  • Manual Input
  • Dropdown Selector for Cities and Areas
Important: Search location settings and submission form location settings are related, but they are not the same option. Search settings control how visitors search by location. Submission settings control how owners/admins add the City and Area when creating a listing.

CONTENT

  • Which location setup should you choose?
  • Location settings overview
  • Google Places Autocomplete
  • OpenStreet Places Autocomplete
  • Manual Input for City and Area
  • Dropdown for Cities and Areas
  • Important: Cities and Areas are independent
  • Country: Array warning on listing page
  • Related help

Which Location Setup Should You Choose?

Use the table below to decide which setup is best for your website.

Setup Best for How City / Area are added
Google Places Autocomplete Websites that want location suggestions from Google while typing. The user starts typing and selects a suggestion from Google Places.
OpenStreet Places Autocomplete Websites that want autocomplete without using Google Places. The user starts typing and selects a suggestion from OpenStreet Places.
Manual Input Websites that want owners/admins to type the City and Area manually. The user types the City and Area as text.
Dropdown Selector Websites that want owners/admins to select only predefined Cities and Areas. The user selects City and Area from dropdowns populated from wp-admin taxonomies.
Important: If you want full control over the available cities and areas, use the dropdown setup. If you want faster location entry with suggestions, use Google Places or OpenStreet Places.

Location Settings Overview

The main settings are found in:

WPRentals Options > Search > Location Field Search Settings

This section includes options for:

  • Using Google Places or OpenStreet Places for the location field.
  • Using dropdowns for locations saved from properties in the search field.
  • Using dropdowns for Cities and Areas in the submission form.

Map and Places provider settings are managed from:

WPRentals Options > Map Configuration > Map General Settings

Important: If you enable Google Places or OpenStreet Places, the City field works as an autocomplete field. If you disable Places, you can use manual input or dropdowns for City and Area in the submission form.

Google Places Autocomplete

Use this option if you want the City field to show location suggestions from Google Places while the user types.

What It Does

  • Enables Google Places autocomplete.
  • Allows users to start typing a location and select a Google suggestion.
  • Saves location details such as City, Area, and Country, depending on the selected Google result.

Step 1: Configure Map Settings

Go to:

WPRentals Options > Map Configuration > Map General Settings

Then:

  1. Set What Map System do you want to use? to Google Maps.
  2. Enable or select Google Places for the Places API option.
  3. Add the API Key for Google Maps.
  4. Save changes.

Google Maps Settings Guide

Optional: Limit Places Results to a Specific Country

You can limit Google Places or OpenStreet Places suggestions to a specific country.

This is useful if your website accepts listings only from one country.

Step 2: Configure Location Field Settings

Go to:

WPRentals Options > Search > Location Field Search Settings

Then:

  1. Set Use Dropdowns for Cities and Areas in Submission Form? to No.
  2. Set Use Google Places or Open Street Places for Location Field in Search? to Yes.
  3. Save changes.

How It Works in the Submission Form

  1. Go to User Dashboard > Add New Listing.
  2. Fill in the required fields.
  3. In the City field, start typing a city name.
  4. A dropdown appears with suggestions from Google Places.
  5. Select the correct location from the dropdown.
  6. The Country and other location details are filled based on the selected suggestion.
  7. Complete the remaining listing details and publish the listing.



Important: Google Places requires a valid Google Maps API key and the correct Google APIs enabled in your Google account.

OpenStreet Places Autocomplete

Use this option if you want autocomplete suggestions without using Google Places.

What It Does

  • Enables OpenStreet Places autocomplete.
  • Allows users to start typing a location and select a suggestion.
  • Saves location details such as City, Area, and Country, depending on the selected result.

Step 1: Configure Map Settings

Go to:

WPRentals Options > Map Configuration > Map General Settings

Then:

  1. Set What Map System do you want to use? to OpenStreet.
  2. Set What Places API do you want to use? to OpenStreet.
  3. Save changes.

Optional: Limit Places Results to a Specific Country

You can limit Google Places or OpenStreet Places suggestions to a specific country.

Step 2: Configure Location Field Settings

Go to:

WPRentals Options > Search > Location Field Search Settings

Then:

  1. Set Use Google Places or Open Street Places for Location Field in Search? to Yes.
  2. Set Use Dropdowns for Cities and Areas in Submission Form? to No.
  3. Save changes.

How It Works in the Submission Form

  1. Go to User Dashboard > Add New Listing.
  2. Fill in the required fields.
  3. In the City field, start typing a city name.
  4. A dropdown appears with suggestions from OpenStreet Places.
  5. Select the correct location from the dropdown.
  6. The Country and other location details are filled based on the selected suggestion.
  7. Complete the remaining listing details and publish the listing.

The autocomplete field appears in the submission form location fields, depending on the selected form setup.



Manual Input for City and Area

Use this option if you want owners/admins to manually type the City and Area when adding a listing.

What It Does

  • Disables Google Places and OpenStreet Places autocomplete.
  • Allows manual input for City and Area / Neighborhood.
  • Uses a dropdown for Country selection.

Step 1: Configure Search Location Settings

Go to:

WPRentals Options > Search > Location Field Search Settings

Then:

  1. Set Use Google Places or Open Street Places for Location Field in Search? to No.
  2. Find Use Dropdowns for data saved from properties in Location Search Field?.
  3. Choose how the search location field should work:
    • No – visitors can type locations in the search field.
    • Yes – the search field uses dropdown choices based on locations saved from properties.
  4. Save changes.

Step 2: Configure the Submission Form

Go to:

WPRentals Options > Search > Location Field Search Settings

Then:

  1. Find Use Dropdowns for Cities and Areas in Submission Form?.
  2. Set it to No.
  3. Save changes.

How It Works in the Submission Form

  1. Go to User Dashboard > Add New Listing.
  2. Fill in the required fields.
  3. In the City field, manually type the city name.
  4. Manually enter the Area / Neighborhood.
  5. Select the Country from the dropdown list.
  6. Complete the remaining listing details and publish the listing.
Important: Manual input gives more freedom, but it can create duplicate or inconsistent locations if users type different versions of the same city or area.

Dropdown for Cities and Areas

Use this option if you want owners/admins to select only predefined Cities and Areas when adding a listing.

What It Does

  • Displays dropdowns for Cities and Areas in the submission form.
  • Dropdown options are populated from locations added in wp-admin.
  • Prevents users from typing new city or area names directly in the submission form.
  • Helps keep location names cleaner and more consistent

Go to WPRentals Options > Search > Location Field Search Settings

Then:

  1. Find Use Dropdowns for Cities and Areas in Submission Form?.
  2. Set it to Yes.
  3. Save changes.

Step 3: Add Cities and Areas in wp-admin

Before users can select Cities and Areas from dropdowns, you must add them in wp-admin.

Go to:

Wp-admin > Listings > Cities and Areas

Manage Cities and Areas

How It Works in the Submission Form

  1. Go to User Dashboard > Add New Listing.
  2. Fill in the required fields.
  3. Select the City from the dropdown.
  4. Select the Area from the dropdown.
  5. Select the Country from the dropdown list.
  6. Complete the location details, including County and State if needed.
  7. Complete the remaining listing details and publish the listing.

Important: Cities and Areas Are Independent

In the dropdown setup, Cities and Areas are independent dropdowns.

This means the Area dropdown is not automatically filtered based on the selected City.

Important: Because Cities and Areas are independent, make sure your location structure is clear before adding many listings. If you need to avoid confusion, use clear naming for areas and keep your location taxonomy organized.

Country: Array Warning on Listing Page

If you see a warning on the listing page or in the address details area that shows Country: Array, it means the Country value for that specific listing is missing or was not saved correctly.

This can happen when the site uses Google Places or OpenStreet Places autocomplete and the City/location was typed manually instead of selected from the autocomplete suggestions. In the autocomplete setup, the Country is saved together with the selected City/location result. If the suggestion is not selected, the Country may not be saved correctly.

How to fix the listing

  1. Go to wp-admin > Listings.
  2. Edit the listing that shows the warning.
  3. Check the location/address fields.
  4. If you use Google Places or OpenStreet Places autocomplete, type the City again and select the correct suggestion from the autocomplete dropdown.
  5. If you use manual input or dropdowns, select the correct Country from the Country field/dropdown.
  6. Update the listing.
  7. Clear all cache and check the listing page again.
Important: For autocomplete setups, always select the City/location from the autocomplete suggestions. Do not only type the city name and leave the field without selecting a suggestion.

If the warning is visible on the live site

Warnings like Country: Array usually become visible on the frontend when WordPress debug display is enabled.

On a live site, PHP warnings should not be displayed to visitors. They should be logged instead.

To hide warnings from visitors, disable debug display in wp-config.php.

define( 'WP_DEBUG', false);
define( 'WP_DEBUG_LOG', false );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
Important: If the same constants already exist in wp-config.php, edit the existing lines. Do not add the same constants twice.

WordPress debug documentation:

Debugging in WordPress

Related Help

  • Google Maps Settings
  • Search Form Location Options
  • Manage Submission Fields
  • Manage Property Taxonomies, Cities, and Areas
Property / Listing

Related Articles

  • How to Change Thumbnail / Images Sizes
  • How to work with the Listing Page Layout Manager
  • Login & Register – How to Create Renters / Owners
  • Videos – How to add a listing – User Dashboard & Submission Form

HELP CATEGORIES

  • 61. General
  • 72. Installation & Basic Setup
  • 373. How Booking Works
  • 18Advanced Search
  • 17Elementor WPRentals Studio
  • 14Email Notifications
  • 27FAQ
  • 14Installation FAQ
  • 10Menu Options
  • 33Owner & Renter
  • 8Page Templates
  • 24Property / Listing
  • 22Shortcodes
  • 4Supported Maps
  • 99Technical how to
  • 5Third Party plugins
  • 4Translation & Multi Languages
  • 3WordPress Blog Post
  • 13WordPress Widgets
  • 12WP Rentals Payments
  • 80WP Rentals Theme Options
  • 26WPML & Weglot

Join Us On

Powered by WP Estate - All Rights Reserved
  • Client Support
  • Video Tutorials
  • WPRentals
  • WPEstate
  • API