In search.php I'm using
<?php if ($post->post_type=='page') continue; ?>
to exclude pages from being shown in search results (only posts)
But this makes the search result page show an inconsistent number of results, since it just removes the pages, sometimes the search result page could be empty, or have just a few results missing. This looks quite weird to the user as well.
Is there any way to always show the same number of results "and" not show "pages" on search results?