HowTo: Exclude Categories from RSS Feeds

HowTo: Exclude Categories from RSS Feeds

6 May 2007 ·

Blogging, Tips and Tricks


A few days ago, I was thinking of excluding the Asides category from my RSS feed since this category is mostly about personal stuff and I also assume that most of the subscribers aren’t interested to read it. I did a little bit of research and found a way of excluding specific categories from RSS feeds.

First thing you need to do is identify the ID of the category that you want to exclude from your feeds. You can do that by going to your Admin panel, then Manage > Categories and there you’ll see all the ID’s for the different categories. In my case, the category I want to exclude from my feed is the Asides category and it has 23 as it’s ID. Since I’m using Feedburner, I’ll have to edit the original feed source.

Original feed URL:

http://jaypeeonline.net/feed/


Edit feed URL to:

http://jaypeeonline.net/feed?cat=-23


Adding another category:

http://jaypeeonline.net/feed?cat=-23&cat=-24


The last bit of data specifies which category or categories you want to exclude from the feed. You can exclude any category of your choice from your blog’s feed and you can use this even if you’re not using Feedburner as this should work for any type of feed. I’m not 100% if this procedure works. If you decide to try it, any type of feedback or comments would be appreciated.

Also, I don’t think everyone has a need for this but hopefully it would be helpful to those who plan to do it or have been looking for a way to do so.


Subscribe to JaypeeOnline's RSS feed  Share this on del.icio.us  Stumble It!  Digg this!  Share this on Facebook  Tweet this!  Share on FriendFeed  Bookmark It!  Submit to Reddit!  Email this story to a friend!
Written by Jaypee Habaradas
Owner and editor of JaypeeOnline. Self-proclaimed geek. New media writer and consultant. WordPress advocate. Loves blogging, gadgets, video games and sports. You can follow him on Twitter @jaypee or Facebook.
Don't miss a single post and receive FREE updates on your email inbox. Subscribe NOW!

Enter your email address:

*Don't forget to verify your subscription by clicking the link on the email that Feedburner will send you.*

Didn't find what you're looking for? Try looking for it again.

Related Posts

Related Ads

























,

**Comments posted on JaypeeOnline are moderated. I reserve the right to edit/delete comments that contain words or phrases that are defamatory, abusive, incite hatred and advertise an email address, commercial services or spammy.


24 Responses to “HowTo: Exclude Categories from RSS Feeds”

  1. Johan Google Chrome Windows Says:

    Hi Thanks for sharing. I publish an email newsletter from RSS, created a directory and published a linked and sent out this stuff to my newsletter. Now I can exclude all the directory categories. It will be a few.

    Reply

  2. paul UNITED STATES Mozilla Firefox Windows Says:

    fantastic. thanks for the great tip. worked perfectly and so easy…

    Reply

  3. Andrei Zharau UNITED STATES Mozilla Firefox Windows Says:

    Exactly what I was looking for! Thank you for a such simple explanation.

    Reply

  4. Michelle Dancer UNITED KINGDOM Mozilla Firefox Windows Says:

    Oh this is brilliant, thankyou. Worked like a charm.

    Reply

  5. Reino NETHERLANDS Mozilla Firefox Windows Says:

    Such an easy but brilliant tip! Thanks!

    Reply

  6. Clare Swindlehurst UNITED KINGDOM Mozilla Firefox Windows Says:

    Brilliant tip – and just what I needed. I want to exclude a category from my feed so that I don’t bombard readers with a big site update I’m about to do.
    Thanks
    .-= Clare Swindlehurst´s last blog ..Hollywood Rip Ride Rockit Finally Opens =-.

    Reply

  7. Personal Report ITALY Safari Mac OS Says:

    Thank you for sharing this tip, it saved me a lot of work. While I was working on the “cat=” query I found out that the best way for excluding categories is to put all the categories comma separated.

    This is the way you suggest:
    http://jaypeeonline.net/feed?cat=-23&cat=-24

    This is the wordpress standard:
    http://jaypeeonline.net/feed?cat=-23,-24

    And, by the way, here‘s an explaination of how to find out the category’s id.

    Hope this comment helps.
    Bye.

    Reply

  8. Kolia UKRAINE Mozilla Firefox Windows Says:

    Jaypee, thanks for the reply. I have tried to exclude 3 categories… I didn’t work for me. Probably I did smth wrong. I have chosen another option – editing function.php file, as far as i remember

    Kolias last blog post..Зміна клімату – 10 фактів, які має знати кожен.

    Reply

  9. Jaypee UNITED STATES Mozilla Firefox Linux Says:

    @Saimatkong – Glad to hear that. Sama sama. :D

    Reply

  10. saimatkong MALAYSIA Mozilla Firefox Windows Says:

    hey, it works for me. thanks.

    saimatkongs last blog post..Show will go on for rock star Avril Lavigne on Aug 29

    Reply

  11. Jaypee UNITED STATES Mozilla Firefox Linux Says:

    @Kolia – You’re welcome! How many categories do you want to exclude from your feed? It should work if you followed the format for adding categories. You also need to check if you got the category numbers right. Let me know if you’ve fixed it or if the format still doesn’t work. Thanks for sharing! :)

    Reply

  12. Kolia Shlapak UKRAINE Mozilla Firefox Windows Says:

    Thanks for this tip but I’ve got a little problem with it
    it works only with one category excluded
    what could be a reason?

    Kolia Shlapaks last blog post..10 ?по?обів витрачати гроші з думкою про природу

    Reply

  13. Jaypee UNITED STATES Mozilla Firefox Windows Says:

    @Tobi – Yes, this is muchh easier than using a plugin. But both have their advantages and disadvantages. You’re most welcome! Thanks for dropping by and leaving comment. :D

    Reply

  14. Tobi GERMANY Mozilla Firefox Windows Says:

    Wooa… this is really easy. What a easy way to exclude pays entries from the feed. Thats cool. Thats really simple and cool.

    Thanks you very much for this information… its absolutely unneccessary to build any plugins, this is much easier as jhay mentioned ;)

    Tobi’s last blog post..Feedst Du schon oder fav’st Du noch?

    Reply

  15. Jaypee UNITED STATES Mozilla Firefox Ubuntu Linux Says:

    @Shari – I see, it’s good to know that it works.

    @jhay – I didn’t know that there was a plugin for this, anyways, it’s always good to have another option.

    @Dre – You’re welcome! Glad to know you found it useful. :D

    Reply

  16. Dre PHILIPPINES Mozilla Firefox Windows Says:

    This is very useful. Thanks for sharing ;)

    Reply

  17. jhay PHILIPPINES Mozilla Firefox Windows Says:

    I think I came across a plugin once that controls which categories appear in your feeds. Forgot the details though, but your tips is as simple as opening the fridge. ;)

    Reply

  18. Shari PHILIPPINES Mozilla Firefox Windows Says:

    It works, I think. I’ve been kind of using it. ;)

    Reply

  19. Jaypee UNITED STATES Internet Explorer Windows Says:

    @trench – You’re welcome! Let me know if it works.

    Reply

  20. trench GUAM Mozilla Firefox Windows Says:

    I might just have to do this. Thanks for the tip JP.

    Reply

Don't Be Shy. Share your thoughts!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackbacks/Pingbacks

  1. [...] Excluding categories from your RSS feed [...]

  2. [...] I came across this tutorial at jaypeeonline.net, which (along with the helpful comments) worked [...]

  3. [...] some help from WordPress’ Codex Page on GetPosts().  Finally, JayPee has a great article on how to exclude a category from your WordPress RSS.  We chose to update the source feed for FeedBurner so that everyone’s Feed subscriptions [...]

  4. Einzelne WordPress-Kategorien aus dem RSS-Feed ausschließen…

    Ich habe kürzlich nach einer Antwort auf diese Frage gesucht in bin erstaunlicherweise auf kein WordPress-PlugIn, sondern einen viel einfacheren Weg gestoßen.
    Einzige Voraussetzung, ihr müsst solltet den RSS-Dienst FeedBurner nutzen, damit die Feed-…