Hello again!
I have
Parent CPT with location information using the 'Address' custom field.
I have Child CPT archive page.
I have created the archive page for the child, but I would like a map that shows the markers related to the child posts within the loop.
Is this possible?
hidden link
Many Thanks
Hi,
Thank you for contacting us and I'd be happy to assist.
I tried to view the link that you shared but it was behind a coming soon page.
You can include the map markers from the related parent post, by manually adding the map marker shortcode (wpv-map-marker) in a "Field and Text" block, inside the archive's loop:
( ref: 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-slug' item='@relationship-slug.parent'][/wpv-map-marker]
You'll replace:
- map-1 with the ID of your map
- address-field-slug with the slug of your address field
- relationship-slug with the relationship slug
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi Waqar,
I've done exactly what you described, unfortunately to no avail.
If you could open private reply, I would be happy for you to take a look yourself?
Many Thanks
Steve
My solution was found when I switched to the legacy (classic) editor.
My issue is resolved now. Thank you!