Problem:
I have a map and a search query on a page where the distance is hard-coded to 50 miles. If no results are found within 50 miles, I want to automatically expand the search to 350 miles without requiring the user to re-enter their address. I considered using the [wpv-no-items-found] section to trigger a second view but wasn't sure how to pass the user's address to the second view.
Solution:
You can pass the URL parameter containing the user's address from the first view to the second view. Use the URL parameter toolset_maps_distance_center to set the address in the second view, which will then perform the expanded search within 350 miles.
Relevant Documentation:
https://toolset.com/documentation/legacy-features/views-plugin/passing-arguments-to-views/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
This topic contains 3 replies, has 3 voices.
Last updated by 4 months ago.
Assisted by: Christopher Amirian.