Show near by listings from different CPTs
This topic contains 7 replies, has 2 voices, and was last updated by Alex Rollin 7 years, 1 month ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
October 31, 2018 at 4:51 pm #452033
Hi,
I’m currently evaluating migrating over to GD.
At present, I already have a map based listing solution pulled together out of different plug-ins.
One of the things I can do with that approach is to include all CPTs on the map, and also do a location search across CPTs.
For example, if you see the attached screenshot, a user view the listing for a Campsite, and also find nearby activities, walking routes, or other nearby campsites and accommodation.Is this possible with GD? From reading the documents, it doesn’t look possible.
Thanks,
GavOctober 31, 2018 at 4:56 pm #452037With the built in functionality that GD provides only one CPT can be searched or shown on a map at a time. GD is faster and more scalable than other directory solutions in part because of this architecture decision.
October 31, 2018 at 5:02 pm #452038Understood. But on the listings detail page, can I use a shortcode (or call a PHP function from the template file), to query the three nearest items of other CPTs. For example, the three nearest pubs, the three nearest walking routes, etc.?
October 31, 2018 at 7:34 pm #452053I am not aware of a widget or shortcode that does that, but I will flag your question for the developers.
I have been answering your questions in regards to V1, but, V2 offers a new features that may be interesting to you.
Within the GD listings shortcode it is now possible to specify a location that exists in the Location Manager, and to call up a list of listings of one post type that are all “IN” that location. Several of the shortcodes could be added to show more listing types next to each other on the same page “IN” that same location.
Indeed this is how location pages work, essentially. Every location gets a page, and as many GD Listings shortcodes as are need can be displayed on the same page, of any quantity of post types. All those listings then show up on the map, albeit with a post type selector.
November 1, 2018 at 11:35 am #452109Hello again,
the developers pointed out that the GD Listings Widget and Shortcode, when used on a detail page (a listing with a location) can be configured to
1. Sort listings by distance (from the current listing)
2. Show any post type
3. Be filtered by category
4. And multiple instances can be used to show “Nearby Xs, Nearby Ys, Nearby Zs”If the main concern is to show different listing types together, this can definitely be done on the location page. Indeed every location page can have every post type or category mix, all the listings IN a given location.
Here on a demo site you can see events and places displayed on a location page:
https://wpgeo.directory/supreme-directory/location/united-states/california/san-francisco/November 1, 2018 at 11:52 am #452112Thanks Alex. That sounds like just what I need.
Is that for the GD V2 though, as I couldn’t see which parameter sorts by distance from the current location?
https://wpgeodirectory.com/docs/core-shortcodes/#listingsIf it is V2 only, is there any expected ship date with the updated plug-ins and Supreme theme?
Thanks,
GavNovember 1, 2018 at 1:50 pm #452125For GDV1, I attach a screenshot showing how the Related Listings widget can be sorted by nearest.
Also here is a shortcode that could be used on the GD Detail Bottom widget area.
[gd_related_listings relate_to=categories layout=3 add_location_filter=true list_sort=nearest character_count=0]November 1, 2018 at 1:51 pm #452127V2 has similar options with the gd_listings shortcode.
Up to date information about V2 is available here:
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket