Are you a WordPress user looking to exclude a specific category from your WordPress Feed? Look no further! We have a quick and easy solution for you.
Firstly, you will need to access your functions.php file. Once you have done this, simply copy and paste the following function:
function myFilter($query) {
if ($query->is_feed) {
$query->set(‘cat’,’-99′);
}
return $query;
}
add_filter(‘pre_get_posts’,’myFilter’);
Make sure to change the “99” value to reflect the category ID you wish to exclude/disable in your feed. This function will exclude the specified category from your WordPress Feed.
If you prefer to use a plugin instead of editing your files, we recommend the “Ultimate Category Excluder Plugin”. This plugin allows you to exclude categories from your front page, archives, and feeds. It’s a great alternative for those who prefer not to edit their files.
We hope this quick and easy solution helps you exclude categories from your WordPress Feed. Happy blogging!