<?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: Get the Category ID in WordPress</title>
	<atom:link href="http://curtishenson.com/get-the-category-id-in-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://curtishenson.com/get-the-category-id-in-wordpress/</link>
	<description>Freelance Web Designer and Wordpress Guru</description>
	<lastBuildDate>Thu, 11 Mar 2010 07:00:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Shahar</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2744</link>
		<dc:creator>Shahar</dc:creator>
		<pubDate>Sun, 07 Feb 2010 14:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2744</guid>
		<description>Sorry, try this:
$cat = get_query_var(&#039;cat&#039;);</description>
		<content:encoded><![CDATA[<p>Sorry, try this:<br />
$cat = get_query_var(&#8216;cat&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kuba</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2743</link>
		<dc:creator>Kuba</dc:creator>
		<pubDate>Sat, 06 Feb 2010 15:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2743</guid>
		<description>Thanks for that, worked like a charm!</description>
		<content:encoded><![CDATA[<p>Thanks for that, worked like a charm!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve G.</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2700</link>
		<dc:creator>Steve G.</dc:creator>
		<pubDate>Sun, 24 Jan 2010 21:41:57 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2700</guid>
		<description>Thank you for sharing this code.</description>
		<content:encoded><![CDATA[<p>Thank you for sharing this code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis Henson</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2584</link>
		<dc:creator>Curtis Henson</dc:creator>
		<pubDate>Sat, 12 Dec 2009 06:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2584</guid>
		<description>David,

you just need to change line 3 from

&lt;code&gt;
$q = &quot;cat=&quot; . $id; 
&lt;/code&gt;

and add a negative sign infront of the category id like

&lt;code&gt;
$q = &quot;cat=-&quot; . $id; 
&lt;/code&gt;

that should work.

or just skip the $q part and do it like this:
&lt;code&gt;
query_posts(&quot;cat=-&quot; . $id);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>David,</p>
<p>you just need to change line 3 from</p>
<p><code><br />
$q = "cat=" . $id;<br />
</code></p>
<p>and add a negative sign infront of the category id like</p>
<p><code><br />
$q = "cat=-" . $id;<br />
</code></p>
<p>that should work.</p>
<p>or just skip the $q part and do it like this:<br />
<code><br />
query_posts("cat=-" . $id);<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2583</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sat, 12 Dec 2009 05:57:08 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2583</guid>
		<description>Hi Curtis - if you&#039;re still tending to comments on this page well over a year after posting ;)  I&#039;ve got a question.

Any idea how to apply this in a scenario where you want to EXCLUDE the category in question?

Basically, just like the basic example of how to use the function that you gave in the post - difference being in the &#039;query_posts();&#039; tag, how do you say &quot;exclude $q&quot;? Where the variable $q is the cat ID you&#039;ve just found using the get_cat_id function... make sense?</description>
		<content:encoded><![CDATA[<p>Hi Curtis &#8211; if you&#8217;re still tending to comments on this page well over a year after posting ;)  I&#8217;ve got a question.</p>
<p>Any idea how to apply this in a scenario where you want to EXCLUDE the category in question?</p>
<p>Basically, just like the basic example of how to use the function that you gave in the post &#8211; difference being in the &#8216;query_posts();&#8217; tag, how do you say &#8220;exclude $q&#8221;? Where the variable $q is the cat ID you&#8217;ve just found using the get_cat_id function&#8230; make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Stauffer</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2575</link>
		<dc:creator>Josh Stauffer</dc:creator>
		<pubDate>Thu, 03 Dec 2009 15:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2575</guid>
		<description>Baller!

This wasn&#039;t exactly what I was looking for but it led me to try get_cat_name() and for this, I thank you!

-Josh</description>
		<content:encoded><![CDATA[<p>Baller!</p>
<p>This wasn&#8217;t exactly what I was looking for but it led me to try get_cat_name() and for this, I thank you!</p>
<p>-Josh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2572</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 29 Nov 2009 12:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2572</guid>
		<description>I ran into the same problem as someone further up.. How to get the category ID from the category page.

Use get_query_var(&#039;cat&#039;)


Thanks for a great tip.</description>
		<content:encoded><![CDATA[<p>I ran into the same problem as someone further up.. How to get the category ID from the category page.</p>
<p>Use get_query_var(&#8216;cat&#8217;)</p>
<p>Thanks for a great tip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahar</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2568</link>
		<dc:creator>Shahar</dc:creator>
		<pubDate>Mon, 16 Nov 2009 15:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2568</guid>
		<description>&lt;code&gt;single_cat_title();&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><code>single_cat_title();</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: der</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2565</link>
		<dc:creator>der</dc:creator>
		<pubDate>Tue, 03 Nov 2009 19:26:22 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2565</guid>
		<description>Just what I needed. Thanks for sharing (btw, your site rocks! )</description>
		<content:encoded><![CDATA[<p>Just what I needed. Thanks for sharing (btw, your site rocks! )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis Henson</title>
		<link>http://curtishenson.com/get-the-category-id-in-wordpress/comment-page-1/#comment-2559</link>
		<dc:creator>Curtis Henson</dc:creator>
		<pubDate>Sat, 24 Oct 2009 18:37:39 +0000</pubDate>
		<guid isPermaLink="false">http://curtishenson.com/?p=123#comment-2559</guid>
		<description>Try posting the code without  should work.</description>
		<content:encoded><![CDATA[<p>Try posting the code without  should work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
