【发布时间】:2017-07-15 14:34:37
【问题描述】:
作为开发人员,我有 ACF 和 WordPress 的初学者。 因此,我想从 WordPress 面板中选择必须在 div 中显示的标题帖子。我有一些名为“hot_news”的 ACF 文件,它是 post 对象。返回的内容是帖子对象,而不是 ID。
我还有“显示帖子是否等于(某些帖子标题)”。
这是我的代码:
<div class="bp1-col-1-1 news-line">
<a class="button button-hot-news" href="#">Aktualności</a>
<img class="hot-icon hot-icon-left" src="<?php echo get_bloginfo('template_url') ?>/images/warning-icon.png" alt="Hot news!">
<div class="morquee-efect">
<a class="hot-news-title" href="#"><?php the_field('hot_news'); ?></a>
</div>
<img class="hot-icon hot-icon-right" src="<?php echo get_bloginfo('template_url') ?>/images/warning-icon.png" alt="Hot news!">
</div>
当我让它显示时,但不显示帖子标题。怎么了?
【问题讨论】:
标签: wordpress field advanced-custom-fields