absint( $section_column ), 'post__not_in' => array( get_the_ID() ), 'ignore_sticky_posts' => true ); $current_post_cats = get_the_category( get_the_ID() ); if ( $current_post_cats && is_array( $current_post_cats ) ) { foreach ( $current_post_cats as $post_cat ) { $post_cats[] = $post_cat->term_id; } $related_posts_args['category__in'] = $post_cats; } $related_posts_query = new WP_Query( $related_posts_args ); if ( $related_posts_query->have_posts() ) : ?>