【发布时间】:2021-04-01 12:08:39
【问题描述】:
我想在我的主页上以post__in 下指定的顺序显示每个帖子一天。这意味着首先 ID 为 3 的帖子应显示至 23:59:59,然后 ID 为 1 的帖子显示 24 小时至 23:59:59,然后是 ID 为 2 的帖子,依此类推。显示所有帖子后,它应该从头开始。有谁知道如何实现这个?
function post_of_the_day( $query_args) {
global $post;
$query_args = array(
'post_type' => 'example_post_type',
'posts_per_page' => 1,
'post__in' => array(3, 1, 2, 4, 7, 6, 5)
);
return $query_args;
}
【问题讨论】: