【发布时间】:2019-08-11 06:22:30
【问题描述】:
我正在使用 ACF 谷歌地图向客户指示招标简报地点。
我正在使用 ACF True/False 字段,并且希望仅当该字段设置为 TRUE 时才显示 Google 地图地址链接。
<span class="font-weight-bold">
<b>Compulsory Briefing:</b>
</span>
<?php the_field('compulsory_briefing') ?><br/>
<span class="font-weight-bold">
<b>Address [Google Maps] <a class="directions" target="_blank" href="https://www.google.com/maps?saddr=My+Location&daddr=<?php $location = the_field('briefing_address'); echo $location['lat'] . ',' . $location['lng']; ?>"> <?php _e(' Get Directions','roots'); ?>
</a>
【问题讨论】:
标签: google-maps advanced-custom-fields