Navigation überspringen

[Gelöst] Filter Distance based on Post Address

This support ticket is created vor 6 Jahren, 2 Monaten. 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)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 6 Jahren, 2 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#1149280

On, versteckter 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.

versteckter 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":
versteckter 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":
versteckter 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