I'm trying to create a loop that goes at the end of certain posts that will pull posts from related categories and exclude the current post. I feel like I'm close but it's still not quite working. It's just pulling all posts currently for some reason. Any help would be much appreciated.
$args = array(
'posts_per_page' => 8,
//'paged' => get_query_var('paged'),
'post__not_in' => array($post->ID),
'category__in' => $cat_ID
);
// The Query
query_posts( $args );
// The Loop
while ( have_posts() ) : the_post(); ?>
<div style="max-width: 1350px; margin: auto;">
<div id="post-container02">
<div class="post-image"><a href="<?php the_permalink();?>"> <?php the_post_thumbnail(); ?></a></div>
<div class="post-feed-title"><a href="<?php the_permalink();?>"> <?php the_title(); ?></a></div>
<div class="read-more-button"><a href="<?php the_permalink(); ?>">Read More</a></div>
</div><!-- post-container01 -->