<?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>ThemeShaper Forums Topic: global query too deep</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Wed, 19 Jun 2013 18:10:47 +0000</pubDate>

<item>
<title>treibstoff on "global query too deep"</title>
<link>http://themeshaper.com/forums/topic/global-query-too-deep#post-16977</link>
<pubDate>Sun, 14 Nov 2010 17:31:12 +0000</pubDate>
<dc:creator>treibstoff</dc:creator>
<guid isPermaLink="false">16977@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I'm using follwing function to exclude some Categories from the index, the archive &#38;#38; the Search:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
add_filter( 'pre_get_posts','remove_cat_from_home' );&#60;/p&#62;
&#60;p&#62;function remove_cat_from_home( $query ) {&#60;/p&#62;
&#60;p&#62;if ( is_home() &#124;&#124; is_archive() &#124;&#124; is_search() )&#60;/p&#62;
&#60;p&#62;$query-&#38;gt;set( 'cat', '-1,-30,-37' );&#60;/p&#62;
&#60;p&#62;remove_filter('pre_get_posts','remove_cat_from_home' );&#60;/p&#62;
&#60;p&#62;return $query;&#60;br /&#62;
}&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;this works but a little bit too deep.&#60;br /&#62;
&#60;strong&#62;Those excluded categories are also excluded from the TAG search....sic!&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;What can I do???&#60;/p&#62;
&#60;p&#62;best regards thomas
&#60;/p&#62;</description>
</item>

</channel>
</rss>
