Skip Navigation

[Resolved] view displays without map on Divi home page

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Rich 3 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#2001289

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

#2001689

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

#2002313

My issue is resolved now. Thank you!