I am trying to:
Create a custom search for a properties list that includes a map search alongside a bunch of custom search filters, such as property type, min bedrooms, etc.
We have a custom post type (from Types) called properties, which have a bunch of custom fields, into which data is imported via WP All Import on a regular basis (via a cron job that runs overnight).
I've created a new page with the views shortcode 'property-search' on it and it's outputting the filter on the front end.
Link to a page where the issue can be seen:
You can view the page here - hidden link
I expected to see:
When you perform a search, including a location and radius distance, that a list of properties would be returned onto the page which are within the search fields' parameters set by the user. For example, if I enter 5 miles of Selby, UK, 3 min beds, and 'house' as a property type, I would expect a number of properties with meeting those crieritia to be displayed on the page.
Instead, I got:
So, there are a few issues happening:
1. Currently, the only thing you can get is a 'no items found' message, no matter what you do. This DID previously, at least, load some properties
2. When the search DID work, the properties that are returned had almost nothing to do with the search terms selected -- i.e. it seemed to be the same bunch of properties
3. Not all properties were returned. There are currently 67 ish property posts but it would only ever list something like 43 ish. Is there a caching conflict perhaps?
4. The location search definitely doesn't match what's entered. If you look at any property item in the back end, you'll see it has a 'location' field which is populated. It also shows the Google Map location on there, which suggests the address has been geocoded correctly. However, you can search for things on the front end with a location and distance and it doesn't seem to tie together with the results.
Please excuse the styling of the distance search fields, it's a work in progress.