Sauter la navigation

[Résolu] Filter Distance based on Post Address

This support ticket is created Il y a 6 années et 2 mois. 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)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Luo Yang Il y a 6 années et 2 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1149280

On, lien caché , 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.

lien caché

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":
lien caché
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":
lien caché
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