是的,我认为唯一的方法是(参见Andrei Ghorghiu的回答)如果你选择重做循环,稍微棘手的一点是$args
数组与相同get_posts()
\'s默认值:
$args = array(
\'post_type\' => \'event\', \'posts_per_page\' => 6,
\'post_status\' => \'publish\', // If post_type \'attachment\' then \'post_status\' => \'inherit\'
\'orderby\' => \'date\', \'order\' => \'DESC\',
\'suppress_filters\' => true,
\'ignore_sticky_posts\' => true, \'no_found_rows\' => true,
);
$query = new WP_Query;
$myposts = $query->query( $args );