• Hi there,

    just thought i’d post this because it was a headache trying to stitch together all the overly complicated documentation for this plugin + ACF.

    <?php if(get_field('googlemap'))
    	{
    		?>
            <iframe width="400" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=<?php echo the_field('googlemap'); ?>;t=m&z=10&iwloc=A&output=embed&iwloc=near"></iframe>
            <?php
    	}
    	?>

    http://wordpress.org/extend/plugins/advanced-custom-fields-location-field-add-on/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thanks man.. had a rough time until now to get this to display propperly 🙂

    Make sure the field name matches the one you created. To make it clear, the two places where the above code has ‘googlemap’ you would use your own field. for example: get_field(‘your_location_field_here’)

    Thanks venkmanuk.

    Awesome. This saved me so much time 😀 Thank you

    Thank you for posting this!

    Really useful, thanks for sharing this.

    In first time, sorry my english.

    I used this for show a external link with mark of position in google maps.

    Inside the loop i created this for save the coordinates.

    $agenda = get_field('agenda_map');
    $coordinates = $agenda['coordinates'];

    next the google maps URL with the variable $coordinates

    <a href="https://www.google.es/maps?t=h&q=loc:<?php echo $coordinates; ?>&z=17" target="_blank"></a>

    Z parameter is the zoom. I hope that can be helpful.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Advanced Custom Fields – Location Field add-on] How to use this – the easy way’ is closed to new replies.