Hello. I am using the File field to upload a Google Earth file so a user can click it and it will open in Google Earth. This is the code I am using:
<?php if(get_field('google_earth_file')) {
echo '<div class="bttn-google-earth"><a href="' . get_field('google_earth_file') . '" target="_blank">View in Google Earth</a></div>';
}
?>
When I click the link, I get “Array” at the end of my page URL. What am I doing wrong?
You can see the site here: website
Hi @shawn00m
You have selected ‘File Array’ as the return type, correct? This will return an array of data, not a url.
Please change this to ‘File URL’, or read over the docs to see how you can use the array data.
Thanks
E
Thank you. You are the best!