[Resolved] Using the map to plot businesses

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.

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 2 months, 1 week ago.

Assigned support staff: Luo Yang.

Author
Posts
#1611131

I have a business directory with a map element. I would like to create a view where the map is at the top of the page and all the businesses plot on the map with a search option underneath where i could filter by taxonomy (say pubs) and it would only show pubs. When someone clicks on the pin on the map it goes to the single listing. Would be good if listings also appeared under the map as the filters are changed....

Bit like this....

hidden link

Any ideas or pointers welcome 🙂

hidden link

#1611813

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

It is possible with Toolset plugins, for example, you can follow our document to display the map and markers with Views,
https://toolset.com/documentation/user-guides/maps/display-on-google-maps/how-to-display-custom-search-results-on-a-map/

for example, edit the page you mentioned above:
hidden link
Find and edit the view block, outside the view's loop, display a map shortcode:
[wpv-map-render map_id="my-map"]

Within view's loop, display the marker shortcode:
[wpv-map-marker map_id="my-map" marker_id="my-marker-[wpv-post-id]" marker_title="[wpv-post-title]" marker_field="wpcf-my-address-field"][wpv-post-link][/wpv-map-marker]

please replace "my-address-field" with your custom address field slug.

More help:
https://toolset.com/documentation/user-guides/maps/maps-shortcodes/#wpv-map-marker
https://toolset.com/documentation/user-guides/maps/maps-shortcodes/#wpv-map-render