Skip Navigation

[Resolved] Showing parent markers on child archive map

This support ticket is created 2 years, 6 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 3 replies, has 2 voices.

Last updated by SteBlood 2 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2362015

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

#2362287

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

#2363047

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

#2364387

My solution was found when I switched to the legacy (classic) editor.

My issue is resolved now. Thank you!