<?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: Exclude Subcategories in a Loop</title>
	<atom:link href="http://wpengineer.com/exclude-subcategories-in-a-loop/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com/exclude-subcategories-in-a-loop/</link>
	<description>WordPress News, Hacks, Tipps, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Tue, 09 Mar 2010 19:58:49 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: michael</title>
		<link>http://wpengineer.com/exclude-subcategories-in-a-loop/#comment-1051</link>
		<dc:creator>michael</dc:creator>
		<pubDate>Fri, 24 Apr 2009 19:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=876#comment-1051</guid>
		<description>Is there a way to do this on the homepage?</description>
		<content:encoded><![CDATA[<p>Is there a way to do this on the homepage?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://wpengineer.com/exclude-subcategories-in-a-loop/#comment-791</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 04 Mar 2009 21:27:15 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=876#comment-791</guid>
		<description>Cristian:
Should be
&lt;code&gt;$cats .=&quot; AND &quot;.$wpdb-&gt;prefix .&quot;term_taxonomy.term_id NOT IN (&quot;.implode(&quot;,&quot;, $exclude).&quot;)&quot;;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Cristian:<br />
Should be<br />
<code>$cats .=" AND ".$wpdb->prefix ."term_taxonomy.term_id NOT IN (".implode(",", $exclude).")";</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cristian</title>
		<link>http://wpengineer.com/exclude-subcategories-in-a-loop/#comment-790</link>
		<dc:creator>Cristian</dc:creator>
		<pubDate>Wed, 04 Mar 2009 21:00:23 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=876#comment-790</guid>
		<description>First of all, thanks for this function!

I&#039;ve added the script in my ../themes/my_theme/functions.php and this is the error:

Catchable fatal error: Object of class stdClass could not be converted to string in line:
$cats .=&quot; AND &quot;.$wpdb-&gt;prefix .&quot;term_taxonomy.term_id NOT IN (&quot;.implode(&quot;,&quot;, $excludes).&quot;)&quot;;

What could it be?</description>
		<content:encoded><![CDATA[<p>First of all, thanks for this function!</p>
<p>I've added the script in my ../themes/my_theme/functions.php and this is the error:</p>
<p>Catchable fatal error: Object of class stdClass could not be converted to string in line:<br />
$cats .=" AND ".$wpdb-&gt;prefix ."term_taxonomy.term_id NOT IN (".implode(",", $excludes).")";</p>
<p>What could it be?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://wpengineer.com/exclude-subcategories-in-a-loop/#comment-784</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Tue, 03 Mar 2009 11:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=876#comment-784</guid>
		<description>@Robert: thanks for your hint, i have fix the bug</description>
		<content:encoded><![CDATA[<p>@Robert: thanks for your hint, i have fix the bug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://wpengineer.com/exclude-subcategories-in-a-loop/#comment-783</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Tue, 03 Mar 2009 09:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=876#comment-783</guid>
		<description>Frank,

it seems that you changed the excluded categories&#039; array name midway. I&#039;d suggest to amend line #18 to read:

&lt;pre lang=&quot;php&quot;&gt;
$cats .= &quot; AND &quot; . $wpdb-&gt;prefix . &quot;term_taxonomy.term_id NOT IN (&quot; . implode(&quot;,&quot;, $exclude) . &quot;) &quot;;
&lt;/pre&gt;

NB: &lt;code&gt;implode(&quot;,&quot;, $exclude)&lt;/code&gt; replaces &lt;code&gt;implode(&quot;,&quot;, $exs)&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Frank,</p>
<p>it seems that you changed the excluded categories' array name midway. I'd suggest to amend line #18 to read:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cats</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; AND &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>prefix <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;term_taxonomy.term_id NOT IN (&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;,&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$exclude</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;) &quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>NB: <code>implode(",", $exclude)</code> replaces <code>implode(",", $exs)</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
