Last active
April 15, 2018 12:08
-
-
Save hawkidoki/2b8bc30efeed623765cf68914edaf2d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<?php if(have_posts()): ?> | |
<?php while(have_posts()): the_post(); ?> | |
<?php if($map = get_field('google_map')){ ?> | |
<?php $options = get_field_object('google_map'); ?> | |
<div class="acf-map"<?php hwk_acf_map_atts($options); ?>> | |
<div class="marker" data-lat="<?php echo $map['lat']; ?>" data-lng="<?php echo $map['lng']; ?>"<?php hwk_acf_map_icon($options); ?>></div> | |
</div> | |
<!-- Résultat: | |
<div class="acf-map" data-zoom='5' data-style='[{"featureType"...}]'> | |
<div class="marker" data-lat="5.00000" data-lng="5.00000" data-icon="http://www.example.com/themes/mon_theme/assets/markers/1.svg"></div> | |
</div> | |
--> | |
<?php } ?> | |
<?php endwhile; ?> | |
<?php endif; ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment