Sometimes, when you display certain posts on your WordPress powered site you may need to hide specific categories from posts pages. This is needed because categories are often used as system “markers” in site’s structure.

To do this, enter the following lines above the Loop (check out this tutorial for more information on What is The Loop):

<?php if (is_front_page() && !is_paged() 
) $posts = query_posts($query_string . '&cat=-33,-66'); ?>

This prevents posts from categories 33 and 66 from appearing in the list of posts.