I have installed WooCommerce, and I have created a custom field called "City" using Toolset. This custom field is of the "Address" type and is placed within a group called "Vehicle location". I input the product's location in the custom field. I want to display a map with the product's location on the frontend of the product. I am working with DIVI.
Hi,
Thank you for contacting us and I'd be happy to assist.
In your Divi template for the product post, you can include the 'wpv-map-render' shortcode generate a map:
( ref: https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render )
[wpv-map-render map_id="map-1"][/wpv-map-render]
And to draw a map marker on this map from the 'city' address field, you can include the shortcode 'wpv-map-marker':
( ref: https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker )
[wpv-map-marker map_id='map-1' marker_id='marker-1' marker_field='wpcf-city'][/wpv-map-marker]
I hope this helps and please let me know if you need further assistance.
regards,
Waqar