'post_status' => 'publish', 'cat' => '2', 'posts_per_page' => '-1', 'post__not_in' => array($currentID), ); $event_query = new WP_Query( $args );// The Loop if ( $event_query->have_posts() ) { while ( $event_query->have_posts() ) { $event_query->the_post(); ?> } }else{ echo ' Er zijn op dit moment geen projecten. '; } wp_reset_postdata(); ?>