I’m calling two different post types in 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 );
I want to know if there is any way to export result like this order
“post-testimonial-post-testimonial-post-testimonial”
since they are different post types I can’t use normal ASC or DESC orders.
Is there any other way?
Well, I used this method to solve problem.
Wants to share if anyone need it later: