Created
October 2, 2015 10:58
-
-
Save leanda/1c737f494bc2880df687 to your computer and use it in GitHub Desktop.
Explode address information ACF Google Map
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 | |
$location = get_field('your_location'); | |
if( !empty($location) ): | |
?> | |
<?php $location = explode( "," , $location['address']); | |
echo $location[0].', '; //street number | |
echo $location[1].','.$location[2]; //city, state + zip | |
// print_r($location); | |
?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment