I am trying to:
Use Parametric Search to show CPT with custom fields. Location field is conditional and only used on some CPT.
Distance Location is used in the search and will show correct results.
However, even when this is not selected with a value, all CPT with no distance data is ignored in the results.
We have CPT "Listings"
This has an option of Course Type with the options for "Location" or "Online"
Location gives the option of "Dates", "Location", "Day Of Week"
This data is only available when Location is selected.
The Parametric Search Filter - Query Filter - Distance is enabled, means results with no location data is ignored.
Link to a page where the issue can be seen: hidden link
I expected to see:
Online and Location results when CPT Custom Field is selected correctly
Instead, I got:
The Parametric Filter removed CPT of items with no location data, even though the location filter hasn't and data selected to be filtered
The way that WordPress queries work (because of how the underlying MySQL works) is that if you order by some field, and posts which don't have a value for that field will be excluded from the results.
If that's the case, there is no fix or workaround because that's how WordPress works.
No, they are ordered by post date,
If I put in some dummy data to the field it will show,
It seems like its skipping the post as the field is blank/non-existant.
I could possibly set CRED to default a hidden value, but don't think this is the correct approach to the problem.
Can you also confirm, do you see all the results on the initial page load, and it is only when applying some filter (some other filter, not the distance search) when the posts with no location are omitted?
If that's the case it sounds like a default distance is being applied even when none is selected, and if that's the case I can test that, but would like confirmation first.
Sorry, I don't have any news other than that it will be fixed in the next version of Maps, but I don't have a timescale for when work on that will be finished I'm afraid.
I added a comment to the internal ticket indicating that you are asking about progress.