Thanks for that, theprog, but is there a way to make it so that locked posts are totally hidden? They still show the “You must be logged in to view this post” message.
When you say “Replace the ‘wp_head’ filter with ‘the_posts’,” do you mean simply change this line in viewlevel.php:
add_filter('wp_head','filter_posts');
to
add_filter('the_posts','filter_posts');
?
After making that change and replacing the filter_posts function, the protected entries disappear even from people who should be able to see them.