Passer la navigation

[Closed] Map field programmatically

This support ticket is created Il y a 4 years, 3 months. 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 -

Fuseau horaire du supporter : America/Jamaica (GMT-05:00)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Shane Il y a 4 years, 3 months.

Assisté par: Shane.

Auteur
Publications
#2282763

Hey There,

Here I have post type Certified practitioners,

where I have toolset field Location
lien caché

I want to render the map programmatically And I want it to fetch dynamically location field of each user(each post as I visit).

Display the location via marker
example: lien caché

Here is how I have implemented in the template
lien caché

Can you guide me on how do I achieve this programmatically, It will be great help. Thanks!

#2282811

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Keyur,

Thank you for getting in touch.

For clarity are you referring to rendering the map using php code ? Are you customizing your template using PHP code?

Please let me know.

Thanks,
Shane

#2283377

Yes!!!

#2283797

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Keyur,

Then you will need to make use of the do_shortcode() built in wordpress function to render the map shortcodes.

We don't have any custom functions that will be able to render the map itself so it will need to be done using the do_shortcode() function.
https://developer.wordpress.org/reference/functions/do_shortcode/

Here is the shortcode to render the map.
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render

Here is the shortcode to render the marker.
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker

Please let me know if you have any further questions on this one.

Thanks,
Shane

The topic ‘[Closed] Map field programmatically’ is closed to new replies.