Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress 3最新的博客文章按从左到右而不是从右到左的顺序排列_Php_Wordpress - Fatal编程技术网

Php Wordpress 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<

我有以下代码来显示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");

您只需将
float:right
添加到您的div中即可。这将在视觉上满足您的要求。我已发布了一个答案,请告诉我它是否适合您…感谢您的回复。。。不幸的是,这根本没有改变。职位仍然保持不变。。
$recentPosts->query("showposts=3, order=DESC");