Tell us what you are trying to do?
Display a view (businesses) on a Divi home page with a map.
Is there any documentation that you are following?
Is there a similar example that we can see?
The 'Find Business' link in the top menu displays the same view (businesses) and the maps shows on top as it should.
What is the link to your site? hidden link
Hi,
Thank you for contacting us and I'd be happy to assist.
Looking into the code of the "Businesses" page, it seems the map block is added on top of the view block and is not part of the view itself.
( which is the correct way, when working with the Block editor )
But since the same view is then also included on the home page built with the Divi builder, that map block is no longer available.
To make this work, you can follow these steps:
1. On top of the view shown in the homepage's content, you can include a new text widget and add a "wpv-map-render" shortcode:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render
[wpv-map-render map_id="map-1"][/wpv-map-render]
The homepage will now have a map on top of the view, but without any map markers.
2. Next, go to the edit screen of the actual view (businesses), and inside the loop, include a "Fields and Text" block to add the "wpv-map-marker" shortcode:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker
[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_field='wpcf-address-field'][/wpv-map-marker]
Note: You'll replace "address-field" field with your actual address field's slug.
As a result, the marker information will also be available to be shown on the homepage's map.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
My issue is resolved now. Thank you!