You can easily filter or exclude categories from the home page and/or the feed. That’s useful to keep them cleaner or, as in my case, to show posts in the visitor’s language.
I’m using this for WP 2.3.3. I show here some of the $query options, just pick the ones you need. This goes in your theme’s functions.php:
function myKewlFilter($query) {
if (($query->is_home) ||($query->is_search) || ($query->is_feed) || ($query->is_archive)) {
$query->set('cat','35, -51');
return $query;
}
}
add_filter('pre_get_posts','myKewlFilter');
The numbers for cat are the category IDs, they are positive to show that category only and negative to exclude all posts from that category. You can find the IDs at Manage | Categories. This won’t work for the category page itself —that’s it, you’ll get the expected category anyway and the filter will be ignored. If you need to do that, read this post about how to combine several categories.
To exclude categories from the prev/next links, use the last two parameters. This excludes the categories 51, 24 and 30:
previous_post_link('« %link','%title', true, '51 and 24 and 30');


