WP Query Beyond Imgs
// WP_Query arguments
$args = array(
'post_type' => array( 'sqppblock', 'block' ),
'posts_per_page' => '3',
'orderby' => 'rand',
'tax_query' => array(
array(
'taxonomy' => 'sqpptaxovideocat',
'terms' => '$postvideocat',
'field' => 'slug',
'include_children' => false,
),
),
);
// The Query
$beyond_imgs_query = new WP_Query( $args );
// The Loop
if ( $beyond_imgs_query->have_posts() ) {
while ( $beyond_imgs_query->have_posts() ) {
$beyond_imgs_query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();