Wordpress 3篇最新的博客文章,按从左到右的顺序排列,而不是从右到左


Wordpress 3 latest blog posts in order of left to right instead of right to left

我有以下代码来显示3篇最新的博客文章。目前,博客文章显示的是从右到左,而不是从左到右。

<?php $counter = 3;
   $recentPosts = new WP_Query();
   $recentPosts->query("showposts=3");
?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
<div class="box<?php echo $counter--; ?>">

如何使最新的博客首先出现?首先我指的是左边而不是右边。感谢您的帮助!

$recentPosts->query("showposts=3&order=DESC");

有关查询的更多信息,请阅读本文。

只需编辑

$recentPosts->query("showposts=3, order=DESC");