Skip Navigation

[Resolved] Possibility to order search results by distance

This support ticket is created 6 years, 11 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 6 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#600092

Hi there,

With the addition of the geolocation in Maps 1.4, is there any underlying code that can be used to order results by distance?
I know we can use the distance filtering with the maps, but what would be great is to be able to return for example a list of businesses by order of closest to furtherest away, based off either the users location, or a pre-defined address (exactly like it works in maps).

#600139

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - there is no such feature exists to order posts by distance as you said but you may use some custom script and use view's filter wpv_filter_query to order your posts.

Please check following related ticket link that will really help you:
=> https://toolset.com/forums/topic/sorting-orderby-distance/#post-595445