Skip Navigation

[Resolved] Filter the results more based on a radius of the post types respective address fields

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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
#1149649

Ah brilliant, thanks Lou, this is a great start.

Would it be possible to take this one stage further and filter the results more based on a radius of the post types respective address fields?

#1149687

Hi,

In the latest version of Toolset Map plugin, we have introduced address distance filter:
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#filtering-markers-by-distance

So in your case, you can try these:
1) Create a custom address field "address"
2) create a post view, filter by the distance radius using mapcenter shortcode attribute "mapcenter".
3) Then pass current post address value as view's shortcode, like this:
[wpv-view name="VIEW-SLUG" mapcenter="[types field='address'][/types]"]
More help:
https://toolset.com/documentation/user-guides/passing-arguments-to-views/#controlling-the-filter-with-shortcode-attributes

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