ID);
if ($categories) {
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
}
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query(array(
'orderby' => 'rand',
'category__in' => $category_ids,
'post__not_in' => array($post->ID),
'posts_per_page' => 6
)
);
if ( $wp_query ) :
while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
itemscope itemtype="http://schema.org/BlogPosting">
ID ) ) {
$image_id = get_post_thumbnail_id( $post->ID );
$image_src = wp_get_attachment_image_src( $image_id, 'full' );
$image = aq_resize($image_src[0], $catimgwidth, $catimgheight, true, false, false, $image_id);
if(empty($image[0])) {$image = $image_src;}
$img_srcset = kt_get_srcset_output($image[1], $image[2], $image_src[0], $image_id);
} else {
$image_src = virtue_post_default_placeholder();
$image = aq_resize($image_src, $catimgwidth, $catimgheight, true, false, false);
if(empty($image[0])) {$image = array($image_src, null, null);}
$img_srcset = null;
}?>