I have a unique circumstance where I'm trying to hide specific custom posts from one of the loops in my template. It was fairly easy to hide them with an if statement in the loop to prevent them from being shown, but the pagination still counts them, so I have erroneous blank pages.
Currently I'm using:
if (have_posts()) : while (have_posts()) : the_post();
if (($post->post_parent) ) {
continue;
} else {
[Code to display posts]
}