<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Limit Your WordPress RSS Feed To One Category</title>
	<atom:link href="http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/</link>
	<description>WordPress, Programming, Life</description>
	<lastBuildDate>Fri, 13 Jan 2012 09:00:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Paula</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-2534</link>
		<dc:creator>Paula</dc:creator>
		<pubDate>Sat, 11 Jun 2011 20:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-2534</guid>
		<description>naturally the very first page I came to when I left here had the answer. No need to moderate this for my sake — the URL I found is here in case you care to share: http://web-kreation.com/all/4-ways-to-exclude-wordpress-category-from-rss-feeds/

Thanks again! :)</description>
		<content:encoded><![CDATA[<p>naturally the very first page I came to when I left here had the answer. No need to moderate this for my sake — the URL I found is here in case you care to share: <a href="http://web-kreation.com/all/4-ways-to-exclude-wordpress-category-from-rss-feeds/" rel="nofollow">http://web-kreation.com/all/4-ways-to-exclude-wordpress-category-from-rss-feeds/</a></p>
<p>Thanks again! <img src='http://www.itsananderson.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paula</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-2533</link>
		<dc:creator>Paula</dc:creator>
		<pubDate>Sat, 11 Jun 2011 20:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-2533</guid>
		<description>Hey this is just what I need thanks man! Except, I need it in reverse — I need to exclude one category and its children. I&#039;ve been combing the documentation for over an hour and I can&#039;t figure it out. Any suggestions?</description>
		<content:encoded><![CDATA[<p>Hey this is just what I need thanks man! Except, I need it in reverse — I need to exclude one category and its children. I&#8217;ve been combing the documentation for over an hour and I can&#8217;t figure it out. Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liam Dempsey</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-2487</link>
		<dc:creator>Liam Dempsey</dc:creator>
		<pubDate>Thu, 05 May 2011 08:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-2487</guid>
		<description>Hey Will,

Cheers for the quickly posted reply.  Much appreciated!</description>
		<content:encoded><![CDATA[<p>Hey Will,</p>
<p>Cheers for the quickly posted reply.  Much appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-2486</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Wed, 04 May 2011 17:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-2486</guid>
		<description>You can&#039;t directly pass in multiple category names. You&#039;ll have to pass in category IDs instead. This (untested!) code snippet should help:

&lt;pre&gt;
function filterRSSQuery($query) {
	if ( $query-&gt;is_feed ) {
		$cats = array();
		$cats[] = get_cat_ID( &#039;Category 1&#039; );
		$cats[] = get_cat_ID( &#039;Category 2&#039; );
		$cats[] = get_cat_ID( &#039;Another Category&#039; );
		$query-&gt;set(&#039;cat&#039;, $cats);
	}
	return $query;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You can&#8217;t directly pass in multiple category names. You&#8217;ll have to pass in category IDs instead. This (untested!) code snippet should help:</p>
<pre>
function filterRSSQuery($query) {
	if ( $query->is_feed ) {
		$cats = array();
		$cats[] = get_cat_ID( 'Category 1' );
		$cats[] = get_cat_ID( 'Category 2' );
		$cats[] = get_cat_ID( 'Another Category' );
		$query->set('cat', $cats);
	}
	return $query;
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liam Dempsey</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-2485</link>
		<dc:creator>Liam Dempsey</dc:creator>
		<pubDate>Wed, 04 May 2011 15:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-2485</guid>
		<description>Hi Will,

Thanks for the great bit of coding.  Very helpful.

I wonder if you know how to tweak the code so that the RSS feed will include two categories rather than just one.  I&#039;ve tried a number of variations (including using an array), but I can&#039;t seem to sort it out.

Any ideas or guidance would be really appreciated.

Many thanks!</description>
		<content:encoded><![CDATA[<p>Hi Will,</p>
<p>Thanks for the great bit of coding.  Very helpful.</p>
<p>I wonder if you know how to tweak the code so that the RSS feed will include two categories rather than just one.  I&#8217;ve tried a number of variations (including using an array), but I can&#8217;t seem to sort it out.</p>
<p>Any ideas or guidance would be really appreciated.</p>
<p>Many thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-406</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Tue, 05 Jan 2010 17:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-406</guid>
		<description>Placement in the functions.php file is pretty flexible, but I usually try to place my newest changes at the beginning. The add_filter line should go after the function. Placing it directly after the function is the best idea because it makes it clear what&#039;s going on.</description>
		<content:encoded><![CDATA[<p>Placement in the functions.php file is pretty flexible, but I usually try to place my newest changes at the beginning. The add_filter line should go after the function. Placing it directly after the function is the best idea because it makes it clear what&#8217;s going on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Edwards</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-405</link>
		<dc:creator>Mike Edwards</dc:creator>
		<pubDate>Mon, 04 Jan 2010 16:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-405</guid>
		<description>Hey there

I was wondering where you would put this in the functions.php file and would the add filter line need to be right next to the query code you put?</description>
		<content:encoded><![CDATA[<p>Hey there</p>
<p>I was wondering where you would put this in the functions.php file and would the add filter line need to be right next to the query code you put?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-389</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Tue, 15 Sep 2009 15:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-389</guid>
		<description>Thanks for this! It works great!</description>
		<content:encoded><![CDATA[<p>Thanks for this! It works great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-252</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Sat, 18 Apr 2009 02:09:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-252</guid>
		<description>You would most likely put this in your functions.php file for your theme, but you could also put it in a plugin file. It would work either way (though in my mind the functions.php file makes more sense).</description>
		<content:encoded><![CDATA[<p>You would most likely put this in your functions.php file for your theme, but you could also put it in a plugin file. It would work either way (though in my mind the functions.php file makes more sense).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-251</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Sat, 18 Apr 2009 01:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-251</guid>
		<description>Hi Will,

Can you elaborate on how and where to include this? What files?

Thanks,

Matt</description>
		<content:encoded><![CDATA[<p>Hi Will,</p>
<p>Can you elaborate on how and where to include this? What files?</p>
<p>Thanks,</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WordPress and blogging articles for 18.03.09 &#124; WPStart.org - WordPress themes, plugins and news</title>
		<link>http://www.itsananderson.com/2009/03/limit-your-wordpress-rss-feed-to-one-category/#comment-166</link>
		<dc:creator>WordPress and blogging articles for 18.03.09 &#124; WPStart.org - WordPress themes, plugins and news</dc:creator>
		<pubDate>Wed, 18 Mar 2009 15:55:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.itsananderson.com/?p=567#comment-166</guid>
		<description>[...] WordPress: Limit Your RSS Feed To One Category [...]</description>
		<content:encoded><![CDATA[<p>[...] WordPress: Limit Your RSS Feed To One Category [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

