term_id;
}
$related_args = array(
'category__in' => $category_ids,
'post__not_in' => array( $post_id ),
'posts_per_page' => absint( $related_posts_number ),
);
$related_query = new WP_Query( $related_args );
if( $related_query->have_posts() ):
while( $related_query->have_posts() ):
$related_query->the_post();
?>