<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: Exclude subcategories from the_category</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: Exclude subcategories from the_category</description>
<language>en</language>
<pubDate>Thu, 26 Nov 2009 15:13:56 +0000</pubDate>

<item>
<title>Malice on "Exclude subcategories from the_category"</title>
<link>http://wordpress.org/support/topic/222201#post-963309</link>
<pubDate>Thu, 22 Jan 2009 16:32:01 +0000</pubDate>
<dc:creator>Malice</dc:creator>
<guid isPermaLink="false">963309@http://wordpress.org/support/</guid>
<description>&#60;p&#62;ACE doesn't allow to exclude subcategories :(
&#60;/p&#62;</description>
</item>
<item>
<title>testcricket on "Exclude subcategories from the_category"</title>
<link>http://wordpress.org/support/topic/222201#post-958833</link>
<pubDate>Sat, 17 Jan 2009 21:34:08 +0000</pubDate>
<dc:creator>testcricket</dc:creator>
<guid isPermaLink="false">958833@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Re your first question - I used the tags as explained in here&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://codex.wordpress.org/Template_Tags/wp_list_categories&#34;&#62;Template Tags wp-list-categories&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;There is also this plugin&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://wordpress.org/extend/plugins/advanced-category-excluder/&#34;&#62;advanced-category-excluder&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>trex33 on "Exclude subcategories from the_category"</title>
<link>http://wordpress.org/support/topic/222201#post-958819</link>
<pubDate>Sat, 17 Jan 2009 21:10:46 +0000</pubDate>
<dc:creator>trex33</dc:creator>
<guid isPermaLink="false">958819@http://wordpress.org/support/</guid>
<description>&#60;p&#62;FYI, I found a great plugin related to issue of the_category.  Instead of excluding categories from the_category, it enables you to show the subcatories of a specific category that your post is associated with.  Use it in the loop.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://oneserving.com/site-news/wordpress-plugin-show-post-subcategories/&#34;&#62;http://oneserving.com/site-news/wordpress-plugin-show-post-subcategories/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>trex33 on "Exclude subcategories from the_category"</title>
<link>http://wordpress.org/support/topic/222201#post-914218</link>
<pubDate>Wed, 03 Dec 2008 19:30:40 +0000</pubDate>
<dc:creator>trex33</dc:creator>
<guid isPermaLink="false">914218@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Someone posted this brilliant solution to exclude categories from the_category (placed in functions.php of theme).&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function the_category_filter($thelist,$separator=&#38;#39; &#38;#39;) {
	if(!defined(&#38;#39;WP_ADMIN&#38;#39;)) {
		//list the category names to exclude
		$exclude = array(&#38;#39;Something&#38;#39;,&#38;#39;Something Else&#38;#39;,&#38;#39;Blah&#38;#39;,&#38;#39;YAY&#38;#39;);
		$cats = explode($separator,$thelist);
		$newlist = array();
		foreach($cats as $cat) {
			$catname = trim(strip_tags($cat));
			if(!in_array($catname,$exclude))
				$newlist[] = $cat;
		}
		return implode($separator,$newlist);
	} else
		return $thelist;
}
add_filter(&#38;#39;the_category&#38;#39;,&#38;#39;the_category_filter&#38;#39;,10,2);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Questions:&#60;br /&#62;
1. How can I change to this exclude by category ID instead of by category name?&#60;br /&#62;
2. Is there way to automatically exclude subcategories/children of the excluded categories? (i.e., without explicity listing all of the subcats)
&#60;/p&#62;</description>
</item>

</channel>
</rss>
