I created a working search page with Enter a location/Use my location (no map). Where can I set the option to order the results by distance?
I'm using the shortcode to display distance and I get "Your location is needed to show this content." error on some devices and browsers. Chrome and Android device displays the distance but the number never changes when I input an address, it seems to be stuck on the distance from my location. Firefox and Iphone I see only the error.
hidden link
Please advise
Hello,
You can follow our document to setup the distance filters and sort the result by distance:
https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/
If you want to display the distance value between user input value and custom address field value, you can try the option:
URL parameter (useful with custom distance filter)
See screenshot of above document:
https://toolset.com/wp-content/uploads/2018/12/show-the-distance-between-two-points.png
I've already gone over the page you've suggested several times and it doesn't actually detail how to get results working by distance. Toolset has been smooth sailing until I ran into this distance issue.
I'm using the Block editor. The Distance Filter was already there, I've attached a screenshot of my filter and the field settings. Still cant get it to work
The order of the results don't change even when I use one of the result addresses in the Enter a Location field on the search page.
I just want the results to be ordered by distance and to display how far, the way most directories would have it.
I don't know where to find the distance value settings in the screenshot. Again, I'm using block editor, am I using the wrong editor, I came across a few posts about people confused about what editor they should be using with Toolset.
This is the shortcode I added to the view loop in the results
[wpv-geolocation]
[toolset-maps-distance-value origin_source='visitor_location' postmeta='wpcf-office-address' unit='mi'] miles
[/wpv-geolocation]
I'm still having issues across browsers
Please Advise
Although I don't plan on using Elementor, this tutorial (hidden link) was helpful to create custom search via backend Views with the classic editor.
I believe I'm on the right track now
Is the classic editor the only way to get the distance correct? How can I achieve a page to be styled as good as it is with View blocks?
Toolset Blocks plugin is based on WordPress Blocks editor, and WordPress Blocks editor is different page builder than Elementor, It is not recommended to design the same page/post with two page builders, this will conduct unexpected result, so you will need to setup the views in classic editor, then put this view's shortcode into Elementor content.