Skip to content

Instantly share code, notes, and snippets.

@frederikrosendahlkaa
Created July 19, 2019 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frederikrosendahlkaa/3c2e6935d23bbc8072e0fc4f759c6963 to your computer and use it in GitHub Desktop.
Save frederikrosendahlkaa/3c2e6935d23bbc8072e0fc4f759c6963 to your computer and use it in GitHub Desktop.
ACF-VC Integrator - Get google maps to show address instead of coordinator
add_filter('acfvc_google_map','acfvc_google_map_custom_output',10,3);
function acfvc_google_map_custom_output ( $output, $field, $post_id ) {
return '<iframe width="100%" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q='.urlencode( $field["value"]["address"] ).'&hl=en;z=14&amp;output=embed"></iframe>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment