Problem: I would like to display Markers on Google Maps but I don't know how to use custom post types to make it work.
Solution: Okay let's say you create a custom post type called "Locations". Then you create an address custom field and associate that custom field with the Locations post type. Now you can manage each Location as a custom post in wp-admin, or using CRED. When you create a Location post, you will give it a title and then add the related address to the custom field. The title will help you find this Location in wp-admin later.
To display the Map with all the Location markers, first insert a Map shortcode in the content of a custom Page somewhere on your site. Note the ID you used for the Map. Then create a View of Locations. In the Loop, insert a Marker shortcode and link it to the Map you just inserted, using the ID you noted earlier. This will add a Marker to the Map for each Location. Then insert your View of Locations on the same Page as the Map.
Now let's say you need to display different Maps that include different Locations, on different Pages. In other words you need a way to filter Locations. You can do this different ways depending on what you want to accomplish. One way is to use another custom field applied to the Location post, another way is to use a taxonomy applied to the Location, and yet another way is to use post relationships. I would need more information about your site to help you make that decision.
Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 3 replies, has 2 voices.
Last updated by 6 years, 8 months ago.
Assisted by: Christian Cox.