Excluding WordPress Categories from RSS Feed

Easily exclude categories with php

The Problem

In building this new site I needed to figure out how to exclude some categories from the RSS Feed. This is because I have 2 categories (services / portfolio) that make the posts show up on those two pages.

This is a problem for people subscribing to my RSS Feed as these “services” are still classified blog posts to WordPress and are included in the RSS Feed.

The Solution

When linking to your feed add a query string similar to the following:

http://yoursite.com/feed?cat=-1,-2

This would exclude categories 1 and 2 from showing up in your feed.

This has been your quick tip of the day. Hope this helps someone, Cheers!

Related posts:

  1. Spicing up a Feedburner Feed with Pure CSS
  2. WordPress: More than just a blogging platform?
  3. Quick Tip: WordPress Random Posts
  4. Joomla Series Part 1: Organizing Your Content.
  5. WordPress 3.0 Custom Posts


Written by brenelz

Hello everyone, I'm Brenley Dueck or better known as Brenelz. I currently run my own business called Brenelz Web Solutions which focuses primary on winnipeg website design. The web technologies I most specialize in are CSS, jQuery, AJAX, PHP, and the MySQL database. Please make sure to follow me on twitter.

 

Leave a Reply

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>

 
connect with me!