Skip Navigation

[Resolved] Displaying Posts on a map

This support ticket is created 4 years, 4 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 3 voices.

Last updated by markM-8 4 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1796217

I am currently building a directory site. I have 2 post types which are connected using a one-to-many relationship:
Listings
Locations

On each Location CPT page I would like to show all the relevant CPT Listings using a View which I can do. What I cannot do however is get a map to show with all the listings for this location? I have looked through the documentation and It is all related to the new Blocks. I am using the old Views as I am used to this for now.

Can you advise?

#1796463

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Mark

If you are using the legacy Views then in the output of your View, outside of the loop (so it appears only once) you use the Fields and Views button to insert a map shortcode that is responsible for generating the map itself.

Then, within the loop tags use the Fields and Views button to insert a map-marker shortcode, which will be triggered for each post, and is responsible for adding the marker to the map. The marker shortcode includes the id of the map they will be added to, but it should have this added automatically. The dialogs when inserting these shortcodes include various settings, which should be fairly self-explanatory.

If you try and are still stuck, please follow-up with details of what you've done.

#1796585
screenshot-connemara.local-2020.10.01-09_55_55.png
screenshot-connemara.local-2020.10.01-09_55_34.png
screenshot-connemara.local-2020.10.01-09_55_00.png
screenshot-connemara.local-2020.10.01-09_54_20.png

Hello,

I have tried this and I can get a map to show but no markers. Attached shows the options I have tried.

#1796899

Hi. Would it be possible to get an update by close of business if a t all possible today?

#1796903

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Mark,

Based on what I see here, you have the marker shortcode outside of the <wpv-loop> tags.

In order for the markers to display on the map the [wpv-map-marker] shortcode must be places within the loop tags.

Or you can place it in the Loop Item in Location View template on the view.
Thanks,
Shane

#1797077

Great. This worked a treat. Thank you. Is there anywhere you have documents saved for the legacy Views plugin?

#1797123

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Mark,

Happy to see that it is working for you now.

Actually yes here is a link to our legacy documentation.
https://toolset.com/documentation/user-guides/views/

Please let me know if this helps.
Thanks,
Shane

#1797563

My issue is resolved now. Thank you!