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