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:
- Spicing up a Feedburner Feed with Pure CSS
- WordPress: More than just a blogging platform?
- Quick Tip: WordPress Random Posts
- Joomla Series Part 1: Organizing Your Content.
- WordPress 3.0 Custom Posts
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.
Twitter
Follow me on Twitter to keep up to date!
RSS Feed
Keep up with all of our updates by subscribing to our RSS feed!
FaceBook
Join our group on Facebook and become a fan of us!