If your home page is a listing of your most recent blog posts, sometimes you have a category that you don’t want to show on the home page. That’s no problem!
Just change this line in your functions.php file of your theme:
wp_list_categories('orderby=name&exclude=276&title_li=');
Be sure you have a backup of the functions.php file before you make changes to it, and changes to PHP files should always be made through SFTP or your hosting’s file manager. Mistakes in editing PHP files can cause your site to crash.
Or, add the following code anywhere in your theme’s functions.php file. Add extra categories with a comma and a dash (‘-13,-5,-2’). You can also use this same code to exclude categories from your feed by changing the is_home tag to is_feed.
function myFilter($query) { if ($query->is_home) { $query->set('cat','-13'); } return $query; } add_filter('pre_get_posts','myFilter');
Or use the Front Page Category plugin.
You can use my post from last week on how to find the category ID.