获取公文包帖子类型项目
$arg1 = array(
\'post_type\' => \'portfolio\',
\'post_status\' => \'publish\',
\'orderby\' => \'date\',
\'order\' => \'DESC\',
\'posts_per_page\' => 1,
\'type\' => \'featured\'
);
$post_res1 = query_posts($arg1);
获取所有帖子
$post_res2 = query_posts($arg2);
合并所有结果//仅合并唯一的帖子
$all_posts = array_merge($post_res1, $post_res2);
从合并的数组中获取所有帖子ID
$post_ids = wp_list_pluck($all_posts, \'ID\');
获取所有post结果
$args = array(
\'post__in\' => $post_ids,
\'posts_per_page\' => -1,
);
query_posts($args);