Below code will allows you to exclude posts that belong to certain categories from your home page, while they will still be reachable from the inner sections of your site. The_Loop WordPress Codex Reference.
function preventMyCategory($query) { if($query->is_home() && $query->is_main_query()) { $$query->set(‘cat’, ‘-’.get_cat_ID(‘CategoryName’)); // or you can provide direct category id. i.e. 12, 13 } } add_action('pre_get_posts', 'preventMyCategory');
I found one simple plugin PE Category Filter which does the same thing.