【发布时间】:2012-12-05 04:03:13
【问题描述】:
我在 WordPress 网站的页面(不是帖子)上使用精选图片。直到我在页面模板中使用 query_posts 然后标题/品牌 img 恢复为标准图像,它才能正常工作。
这是我正在使用的代码:
<?php
query_posts(array('category_name'=>'news-and-features', 'posts_per_page' => 2 ));
while (have_posts()) : the_post(); ?>
<div class="single-post">
<h3><a href="<?php echo get_permalink(); ?>"><?php the_title();?></a></h3>
<?php the_time('D jS M, Y') ?>
<?php the_excerpt();?>
</div>
<? endwhile; ?>
帖子摘录显示正常。只是query_posts 破坏了特色图片。
有没有人也发现了这个?或者任何可能的解决方案?
我正在使用自定义子主题,以上内容在模板中。
MTIA。
【问题讨论】: