term_id; }, $categories); $args = array( 'category__in' => $category_ids, 'post__not_in' => array($current_post_id), 'posts_per_page' => 4, ); $related_posts_query = new WP_Query($args); if ($related_posts_query->have_posts()) { echo '
Read also:
'; echo '
'; while ($related_posts_query->have_posts()) { $related_posts_query->the_post(); get_template_part('en/content', 'post-en'); } echo '
'; wp_reset_postdata(); } } ?>