我有另一个存储post ID的数据库,我想使用WP\\u查询显示它们,以使用WP默认分页。我使用orderby=>none来保留原始顺序,但结果会根据ID对其进行重新排序。
$ids = array (60, 23, 78, 46, 105, 130)
$args = array (
\'posts_per_page\' => -1,
\'post__in\' => $ids,
\'orderby\' => \'none\'
);
$query = new WP_Query ( $args );
while ( have_posts() ) : the_post();
echo \'<li>\';
the_title();
echo \'</li>\';
endwhile;
有人能帮我吗?谢谢Romulo De Lazzari