我循环浏览帖子并按 category_name=news,如何显示每个帖子的自定义字段?先感谢您。
<?php $preNewsPosts = new WP_Query();
$preNewsPosts->query('posts_per_page=3&category_name=news');
while($preNewsPosts->have_posts()): $preNewsPosts->the_post();
?>
<a href="<?php the_permalink(); ?>" class="atitle" ><?php the_post_thumbnail('thumbnail'); ?><?php the_title(); ?></a>
<?php
the_excerpt();
?>
<hr style="width: 95%; border: 1px solid #e6e6e6; " />
<?php
endwhile;
?>