Saltar navegación

[Cerrado] Map field programmatically

This support ticket is created 4 years, 3 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 -

Zona horaria del colaborador: America/Jamaica (GMT-05:00)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Shane 4 years, 3 months ago.

Asistido por: Shane.

Autor
Mensajes
#2282763

Hey There,

Here I have post type Certified practitioners,

where I have toolset field Location
enlace oculto

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: enlace oculto

Here is how I have implemented in the template
enlace oculto

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

#2282811

Shane
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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

El debate ‘[Cerrado] Map field programmatically’ está cerrado y no admite más respuestas.