Php Wordpress 3最新的博客文章按从左到右而不是从右到左的顺序排列
我有以下代码来显示3篇最新的博客文章。目前,博客帖子从右到左,而不是从左到右Php Wordpress 3最新的博客文章按从左到右而不是从右到左的顺序排列,php,wordpress,Php,Wordpress,我有以下代码来显示3篇最新的博客文章。目前,博客帖子从右到左,而不是从左到右 <?php $counter = 3; $recentPosts = new WP_Query(); $recentPosts->query("showposts=3"); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <div class="box<
<?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");
您只需将float:right
添加到您的div中即可。这将在视觉上满足您的要求。我已发布了一个答案,请告诉我它是否适合您…感谢您的回复。。。不幸的是,这根本没有改变。职位仍然保持不变。。
$recentPosts->query("showposts=3, order=DESC");