Okay I have a custom loop within the main loop of the page that shows 4 posts but obviously excludes the current main post. I'll show you:
<?php $my_query = new WP_Query( "cat=3&posts_per_page=4" ); if ( $my_query->have_posts() ) : while ( $my_query->have_posts() ) : $my_query->the_post(); if($post->ID == $mainPost) continue; ?> <?php get_template_part('workThumb'); ?> <?php endwhile; endif; wp_reset_postdata(); ?>
However I want to show 4 posts in this loop but obviously if it contains the current post then it only shows 3. However if I increase the posts_per_page to 5 then on pages when it doesn't include the current post it shows 5 posts, which I don't want.
I hope this makes sense. Any ideas?