【发布时间】:2016-04-10 22:06:05
【问题描述】:
我开发了 WordPress 主题,并计划添加 Google 广告选项,但我无法打印 Google AdSense 代码。怎么打印?
$googleads_code = get_field('custom_ads');
echo '<div class="adbox">'.$googleads_code.'</div>';
此代码无法在我的模板上打印 Google 广告。我该怎么做?
【问题讨论】:
-
它什么都不返回:?
echo get_field('custom_ads'); -
使用 the_field('custom_ads');打印