我试图做一个简单的查询,将最新的5篇文章放入一个无序的列表中,但这只显示了1个结果,尽管我有几篇文章。我甚至做了一个偏移,但它显示了下一篇文章仍然是1的结果。我做错了什么?
<ul>
<?php $the_query = new WP_Query(\'showposts=5\'); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<li>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<p><?php the_content_limit(250); ?></p>
</li>
<?php endwhile;?>
</ul>