The above was close… I’m crap with terminology so bear with me. The above doesn’t work because it won’t return the right stuff (see, crap with terminology 😉 )
You have to create a variable for the location field so you can access the address array.
$location = get_field(‘location’)
$address = explode( “,” , $location[‘address’]);
echo $address.'<br/>’; //place name
echo $address.'<br/>’; // street address
echo $address.’,’.$address; // city, state zip
This would display as (using your address example):
I would just hard code the word “Location:” above this if you need it at all.
If you do: print_r(explode( “,” , $location[‘address’]));
You will get the array of information that is available from the address object, in case you want country or don’t want street address, etc. Obviously you can tweak the html to your needs when you echo out each thing.
Hope this was helpful!
@kingafrojoe definitely got me on the right path, so thanks dude!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!