ID);
if ($categories) {
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
}
$loop = new WP_Query();
$loop->query(array(
'orderby' => 'rand',
'category__in' => $category_ids,
'post__not_in' => array($post->ID),
'posts_per_page' => 6
)
);
if ( $loop ) :
while ( $loop->have_posts() ) : $loop->the_post(); ?>
itemscope itemtype="https://schema.org/BlogPosting">