Similarily... I have the map/marker working on my clinic profile pages that have 1 location ... but it is not working on the clinic that has multiple locations.
Hello again, is it possible for me to get a wp-admin login for this site? I think it will help speed up the investigation if I can quickly see how things are configured.
Okay the Clinic Address custom field is inside the Clinic Info RFG. There can be more than one, so you must use a View. Edit this Content Template:
hidden link
You should not use the wpv-map-marker shortcode here, because it will only display one marker:
{!{wpv-map-render map_id="map-3" marker_icon="//findtmstherapy.co/wp-content/uploads/2019/10/FindTMS_icon_32px.png"}!}{!{/wpv-map-render}!}{!{wpv-map-marker map_id='map-3' marker_id='marker-4' marker_field='wpcf-clinic-address'}!}{!{/wpv-map-marker}!}
Instead, create a View of the RFG to loop over all the Clinic Infos and display a marker for each row in the RFG. Here are the steps you can try:
- Create a new View and choose "Display all results" in the popup (see new-view-popup.png).
- In the Content Selection area, select Clinic Info RFG. (see content-selection.png)
- In the Query Filter section, add a new "Post Relationship or repeatable field group owner" filter, and choose the Clinic Info relationship. The relationship should be based on the post where the View is shown (see query-filter.png).
- In the Loop Output editor panel, click "Skip wizard".
- Copy and paste this Map Marker shortcode inside the wpv-loop tags:
{!{wpv-map-marker map_id='map-3' marker_id='marker-3-[wpv-post-id]' marker_field='wpcf-clinic-address'}!}{!{/wpv-map-marker}!}
- Notice in the map marker shortcode I changed the marker_id to include the map ID (number 3) and also the wpv-post-id shortcode. Now the marker ID will always be unique, and it will not cause problems if you have more than one map on the same page.
- Insert the new View in the "Content template for Clinics" Content Template just after the wpv-map-render shortcode for map-3.