search display and sort
This topic contains 7 replies, has 3 voices, and was last updated by Alex Rollin 5 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
November 5, 2019 at 7:00 am #515955
Hello,
I have to be missing something simple. I’ve read through the docs and the forums, but just can’t figure out why this is not working.
I simply want to be able to do a search and sort display.
The search would be based on creating a button with a link something like this:
URL/wpgd-search/?geodir_search=1&stype=gd_place&s=pizza&snear=&sgeo_lat=&sgeo_lon=&near=meMy expectation is that this would render a map and archive of those listings which include the term ‘pizza’ and then those listing would be sorted based on distance from my (mobile) geolocation.
The shortcode on the page is:
[gd_notifications]
[gd_search customize_filters=”searched”]
[gd_map width=”100%” height=”360px” maptype=”ROADMAP” zoom=”10″ map_type=”archive” post_settings=”1″ post_type=”gd_place”]
[gd_loop_actions]
[gd_loop layout=5]
[gd_loop_paging]This process DOES work to return a map of the related (term) items. But they are NOT limited to the distance I would expect (based on the settings in places>search>max search range =3mi — I’m getting all related listings, even 15-20-mi away); nor are they sorted by the distance from my geolocation (they seem to be sorted A-Z).
Any help setting me in the right direction is greatly appreciated.
Thanks!
November 5, 2019 at 7:40 am #515958Hi Mitch,
Thanks for your post. Search results are sorted with relevance to what the visitor is searching for. Title, description, tags, and categories are searched, and the location is also considered.
November 5, 2019 at 7:53 am #515961Hi Kor,
Thanks for the timely reply. I understand the standard search structure, but in this case the visitor isn’t searching, we create a ‘search url’ that specifically only searches for a term and the url includes the ‘near me’ and ‘lat lng’ info if allowed (like the example I provided), so why can’t it sort by distance?
With such a high percentage of our users on mobile, search based on ‘near me’ is really important. It seems as though we can add info that to the URL structure, but what good does that feature do if the search return gives us listings 10 miles away as the first ones displayed.
Maybe have the search listings page have a shortcode option to display only items within x distance of the lat lng generated in the search?
There has to be some way to get a closer set of marker points for someone searching on mobile.
Thank you.
November 5, 2019 at 12:49 pm #515987Hello,
to find the right URLs, just perform the search you want and copy that URL.
If you are doing a near search with the search bar then yes, the listings should be sorted by nearest and show distance. Example:
November 5, 2019 at 4:07 pm #516014Hey Alex,
Yes, that’s exactly how I figured out to do a specific search link in a button, copying the URL from a previous search.
But I am trying to make it work as a “Near Me” function, where the geo_lat and geo_lng are determined by the user geolocation.
Using a “Near Me” shortcode/button generates the geo data, but that seems to drop me in to the ‘Location’ page. How do I create a “Near Me” functionality as part of the URL where I have included “&stype=gd_place&s=pizza&snear=”
Thanks!
November 6, 2019 at 1:55 am #516099Use the “Near Me” in the Near Search field to create URLs like that:
It is not possible to dynamically insert the user location, though. The user will need to submit their own location and search.
November 6, 2019 at 6:35 pm #516181If I click on a “near me” button, as created via shortcode GD>Near Me Button “gd_location_near_me”, it drops me into the ‘location’ page
(that page has the shortcode)
[gd_map map_type=”auto” zoom=”12″ width=”100%” height=”425px” search_filter=”1″ cat_filter=”0″]
[gd_search]
[gd_listings post_limit=8 add_location_filter=’1′]which DOES display all markers on map, display limit 8 listed below it that are NEAR ME, and that page has the url = url/location/near/me/actuallat123,actuallng456/
which THEN if I place the search term in the search box on that Location page, it sends me back to the wpgd-search URL – with the expected listings.
I finally get the listings I want, but must take multiple steps to get there.
Why can’t I simply shorten this process? Just be able to add a “&s=pizza” (or coffee, or whatever) search term to what happens when I click the ‘near me’ button?
Thank you.
November 7, 2019 at 12:49 am #516211That’s what the search bar does, I think, unless I am missing something.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket