Exclude Category from WordPress Feed for Better SEO

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) {



return $query;



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!

Stay in Touch


Related Articles