Hiding Categories from the WordPress Feed

Have a private blog category only visible to logged-in members of your blog or website? You can hide that category so that it doesn’t show up in your site’s default feed. Just add this to your theme’s functions.php file:

If you need to exclude more than one category, just add more like this:


  1. Hi Debbie

    The “Hiding Blogs by Categories” was excellent. Can it be enhanced to include any Comments on the hidden categories.

    If you enter website/feed only the unhidden blogs are visible

    If you enter website/comments/feed then all comments are displayed including those on hidden blog categories.



  2. Actually, I don’t know. I Googled a bit to see if I could find an answer but nothing was very obvious – that doesn’t mean there’s not a way to do it though. Maybe there’s a plugin by now that might handle this?

Leave a Reply

Your email address will not be published. Required fields are marked *