Skip to content

Instantly share code, notes, and snippets.

@Dinamiko
Last active December 24, 2016 10:51
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 Dinamiko/a4a79469c85b1fd51b71817e1e359cb7 to your computer and use it in GitHub Desktop.
Save Dinamiko/a4a79469c85b1fd51b71817e1e359cb7 to your computer and use it in GitHub Desktop.
<?php
if( get_field('post_name') ) { ?>
<p><?php echo get_field('post_name');?></p>
<?php }
$image = get_field('post_image');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
<?php
$location = get_field('post_map');
if( !empty($location) ): ?>
<div class="acf-map">
<div class="marker" data-lat="<?php echo $location['lat']; ?>" data-lng="<?php echo $location['lng']; ?>"></div>
</div>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment