Generating dynamic maps in template files
-
Is there any mechanism for dynamically including a map via a template file, where the location is a variable accessible in the template file?
For example, is there any way to use a shortcode, where the address is entered as a parameter of the shortcode?
Or any other way to do this? The address cannot be known ahead of time until the page is generated by the template file.
Something like…
// address was entered in an ACF text field $address = get_field('address'); $shortcode = '[wpgmza id="1" location="' . $address . '"]'; echo do_shortcode($shortcode);It would be great if this were possible!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Generating dynamic maps in template files’ is closed to new replies.