Skip Navigation

[Resolved] Filter Distance based on Post Address

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 5 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1149280

On, hidden link , I have a tab to "Show What's Near".

I want to filter and only show what is 0.5 miles from the address of the current post.

It might be easier to see the issue on this simple page.

hidden link

In the Query Filter, I selected "Distance center is set using shortcode attribute". I tried using the following:

address
field='address'
[types field='address']

Nothing works. Any suggestions?

The login info for the site is in another open ticket that I have.

Thanks
Lee

#1149685

Dear Lee,

Thanks for the details, I can get your website credentials in your another thread:
https://toolset.com/forums/topic/distance-value-missing-in-fields-and-views-insertion-dialog/#post-1144243

And have done below modification in your website:
1) Edit the view "Map Test":
hidden link
Edit the distance filter, option "Filter Radius", setup as 1 mile, in order to test the result, we need a little big radius range.

2) Edit the page "Map test":
hidden link
Change the shortcode from:

[wpv-view name="map-test"]

To:

[wpv-view name="map-test" address="{!{types field='address'}!}{!{/types}!}"]

Please test again, check if it is fixed, thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.