'post', 'category__in' => wp_get_post_categories($post->ID), 'post__not_in' => array($post->ID) ); // run the query $query = new WP_Query( $args ); if( $query->have_posts() ) { ?>

have_posts() ) : $query->the_post(); ?>