1
您好,我在自定义分类页面上显示ACF时遇到问题。ACF字段不显示在WordPress的自定义分类页面
自定义税费是“目的地”,页面为taxomony-destinations.php,该字段称为“destination_landing_image”。我想,以显示它“mysite.com/destinations/coutryname”如下:
<?php if (have_posts()) : while (have_posts()) : the_post();
$destination_landing_image = get_field('destination_landing_image');
<img src="<?php echo $destination_landing_image['url'] ?>" alt="<?php echo $destination_landing_image['alt'] ?>">
<?php endwhile; endif; ?>
奇怪的是有问题的页面不显示自定义职位类型中的ACF领域(节假日顺延),这是低在页面中。所以我想首先我在循环中正确地调用它?其次是一个自定义的分类标准,正确的页面类型使用?
我不是一个开发商,不幸的是:(但设计师对我是如此光秃秃的。当您使用活性炭纤维的帖子,你可以只使用get_field()
,你是任何帮助,将不胜感激
太棒了,如果只有我早点知道! – ivordesign 2014-08-28 13:22:26