Search Shows 0 Results in WPRentals
This help explains what to check when the WPRentals search form shows 0 results.
This can happen with any search field, not only City. One wrong field or one wrong Compare rule can make the search return no listings.
For example, the issue can come from:
- City
- Area
- Country
- County / State
- Guests
- Bedrooms
- Bathrooms
- Check-in / Check-out
- Property category
- Custom fields
The search form fields must match how the listings are saved.
Check All Search Form Settings
WPRentals can use search forms from different places.
Check the search fields in every place used on the website:
- WPRentals Options > Search > Advanced Search Form
- WPRentals Options > Search > Half Map Search Form, if the website uses Half Map
- Elementor search form widget settings, if the search form was built with Elementor
The fields must be set correctly in the form that is actually used on the page.
Example: if the homepage search is made with Elementor, changing only the search fields from Theme Options may not change that Elementor search form.
Check the Compare Rules
Each search field has a Compare rule. The Compare rule tells the theme how to search that field.
Use the correct Compare rule for each field type.
Common examples:
- City / Area / Country / County / State: Like
- Category / Type: Like
- Guests: Greater
- Bedrooms: Greater or Equal
- Bathrooms: Greater or Equal
- Price: Equal, Greater, Smaller, or Between, depending on the setup
- Check-in: Date Greater
- Check-out: Date Smaller
A wrong Compare rule can make the search show 0 results even when listings exist.
Check the Listing Location
Edit a listing that should appear in the search results.
Check the location fields saved for that listing.
The listing must have the same location data that the search form is using.
For example:
- If the search form uses Listing City, the listing must have a City assigned.
- If the search form uses Listing Area, the listing must have an Area assigned.
- If the search form uses Country, the listing must have Country saved.
- If the search form uses County / State, the listing must have County / State saved.
Do not use a search field if that information is not saved in the listings.
Example: if your website does not use states, remove the State field from the search form.
Check City, Area, Country, or State Fields
Some websites use City only. Other websites use City and Area. Other websites also use County / State.
The search form should match the website structure.
For a website that focuses on cities, such as a country where users search mainly by city, use the City field as the main location field.
Do not add too many location fields unless the listings have all those values saved.
Example of a simple city-based search:
- Field: Listing City
- Compare: Like
Optional area field:
- Field: Listing Area
- Compare: Like
If the website does not use State or County, remove those fields from the search form.
Check Guests and Number Fields
Guests, bedrooms, and bathrooms are number fields.
For guests, use a Compare rule that allows larger listings to show.
Example:
- A guest searches for 2 guests.
- A listing allows 4 guests.
- The listing should still show.
For this reason, guest fields usually need:
Compare: Greater
or a compare rule that allows listings with the selected number or more.
If the Compare rule is too strict, valid listings can be hidden.
Check Check-in and Check-out Fields
Date fields must use date compare rules.
Common setup:
- Check-in: Date Greater
- Check-out: Date Smaller
The booking calendar and availability settings can also affect the search results.
If the date fields cause 0 results, test the search once without dates. This helps confirm if the problem is from the date fields or from another field.
Generate Data and Pins
After changing search fields, listing locations, map settings, or listing data, regenerate the theme data.
Go to:
WPRentals Options > Map Configuration > Generate Data & Pins
Click Save Changes.
Then clear the website cache and browser cache.
This helps refresh the location data, map pins, and search/map files.
Test the Search with One Field at a Time
The easiest way to find the wrong field is to test one field at a time.
- Search only by City.
- Then test only by Area.
- Then test only by Guests.
- Then test only by Check-in and Check-out.
- Add fields back one by one.
When the search starts showing 0 results again, the last field added is usually the field that needs to be checked.
Then check:
- The field name
- The Compare rule
- The saved value in the listing
- The search form used on that page
Related Help
Theme Options – Advanced Search Form Fields
How to manage the city and area as dropdown selectors
How to manage listing location with theme autocomplete