【发布时间】:2014-10-23 16:47:53
【问题描述】:
我有以下使用高级自定义字段 (ACF) 的循环 - 除内容外,所有内容均显示。我尝试了各种解决方案,但都没有成功。
<?php
$posts = get_posts(array(
'numberposts' => -1,
'post_type' => 'sectors',
'orderby' => 'menu_order',
'order' => 'ASC'
));
global $post;
if($posts) {
?>
<?php
foreach($posts as $post) {
?>
<div class="content full sector">
<?php the_post_thumbnail(); ?>
<h2><?php the_title(); ?></h2>
<p><?php the_content(); ?></p>
</div>
<?php
}
?>
<?php
}
wp_reset_postdata();
?>
非常感谢任何帮助。
谢谢
【问题讨论】:
标签: wordpress advanced-custom-fields