【发布时间】:2015-08-31 12:40:30
【问题描述】:
我在 WordPress 中调用了两种不同的帖子类型:
$args = array( 'post_type' => array('post','testimonial'), 'posts_per_page' => 6 ,
'meta_key' => 'show_on_home',
'meta_value' => true
);
$loop = new WP_Query( $args );
我想知道有没有办法像这个订单一样导出结果
"post-testimonial-post-testimonial-post-testimonial"
由于它们是不同的帖子类型,我不能使用正常的 ASC 或 DESC 订单。
还有其他方法吗?
【问题讨论】: