<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
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/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>SDAC Inc &#124; Chicagoland Web Development &#187; exclude</title> <atom:link href="http://www.sandboxdev.com/tag/exclude/feed/" rel="self" type="application/rss+xml" /><link>http://www.sandboxdev.com</link> <description>Just another Sandbox Development and Consulting Inc. Sites site</description> <lastBuildDate>Wed, 25 Jan 2012 07:57:33 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Include or Exclude Category for RSS Feed or Search</title><link>http://www.sandboxdev.com/2010/06/16/include-or-exclude-category-for-rss-feed-or-search/</link> <comments>http://www.sandboxdev.com/2010/06/16/include-or-exclude-category-for-rss-feed-or-search/#comments</comments> <pubDate>Wed, 16 Jun 2010 18:12:58 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[SDAC Blog]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[exclude]]></category> <category><![CDATA[Include]]></category> <category><![CDATA[WordPress functions]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/?p=818</guid> <description><![CDATA[There are certain times when you need to include or exclude certain categories in the feed or search results. The easiest way to take care of this is to add the following to your functions.php file. The code above will exclude all posts that are in the category with ID 1 from your feed. If [...]]]></description> <content:encoded><![CDATA[<p>There are certain times when you need to include or exclude certain categories in the feed or search results. The easiest way to take care of this is to add the following to your functions.php file.</p><pre class="brush: php; title: Custom Code; notranslate">
function sdac_remove_from_feed( $query ) {
	if ( $query-&amp;gt;is_feed ) {
		$query-&amp;gt;set( 'cat',-1 );
	}
        return $query;
}
add_filter( 'pre_get_posts','sdac_remove_from_feed' );
</pre><p>The code above will exclude all posts that are in the category with ID 1 from your feed.  If you wanted to exclude everything from the search results &#8211; you would change one line:<br
/> $query-&gt;is_feed to $query-&gt;is_search</p><p>If you wanted to only show items from the category with ID 1 &#8211; you would just need to remove the &#8220;-&#8221; before the category number.</p><p><strong>Note:</strong> You can include/exclude items tagged, etc by changing the &#8216;cat&#8217; to whatever else you would normally use in the query.</p> <script type="text/javascript">sdac_post_slideshows.push({fx: 'fade', timeout: 0, speed: 1000, pause: 0,})</script>]]></content:encoded> <wfw:commentRss>http://www.sandboxdev.com/2010/06/16/include-or-exclude-category-for-rss-feed-or-search/feed/</wfw:commentRss> <slash:comments>16</slash:comments> </item> <item><title>Exclude Single Post in WordPress</title><link>http://www.sandboxdev.com/2008/01/16/exclude-single-post/</link> <comments>http://www.sandboxdev.com/2008/01/16/exclude-single-post/#comments</comments> <pubDate>Wed, 16 Jan 2008 18:37:54 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Logic]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[exclude]]></category> <category><![CDATA[Logic]]></category> <category><![CDATA[post]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/blog/wordpress/2008/01/16/exclude-single-post.php</guid> <description><![CDATA[If you would like to exclude one post from your blog, archive, search results or wherever you need to on your blog, you can do so by putting in a small piece of code within the particular WordPress loop: The following example will show all posts except for the post with the ID of 179: [...]]]></description> <content:encoded><![CDATA[<p>If you would like to exclude one post from your blog, archive, search results or wherever you need to on your blog, you can do so by putting in a small piece of code within the particular WordPress loop:</p><p>The following example will show all posts except for the post with the ID of 179:</p><pre class="brush: php; title: Custom Code; notranslate">
&lt;?php if ( $post-&gt;ID == '179' ) continue;?&gt;
</pre><p>This is something that I get a lot of requests for and is very useful in a number of situations.</p> <script type="text/javascript">sdac_post_slideshows.push({fx: 'fade', timeout: 0, speed: 1000, pause: 0,})</script>]]></content:encoded> <wfw:commentRss>http://www.sandboxdev.com/2008/01/16/exclude-single-post/feed/</wfw:commentRss> <slash:comments>49</slash:comments> </item> <item><title>Exclude Single Category in WordPress</title><link>http://www.sandboxdev.com/2008/01/15/exclude-single-category/</link> <comments>http://www.sandboxdev.com/2008/01/15/exclude-single-category/#comments</comments> <pubDate>Wed, 16 Jan 2008 02:35:16 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Logic]]></category> <category><![CDATA[conditional]]></category> <category><![CDATA[exclude]]></category> <category><![CDATA[Logic]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/blog/wordpress/2008/01/15/exclude-single-category.php</guid> <description><![CDATA[If you ever need to exclude a single category from a WordPress page (archives, index, category page, etc) you can easily do so by using a little conditional tag code within the WordPress loop. The example below will skip over any post that is in the category with the ID of 35: This can be [...]]]></description> <content:encoded><![CDATA[<p>If you ever need to exclude a single category from a WordPress page (archives, index, category page, etc) you can easily do so by using a little <a
href="http://codex.wordpress.org/Conditional_Tags">conditional tag code</a> within the <a
href="http://codex.wordpress.org/The_Loop">WordPress loop</a>.</p><p>The example below will skip over any post that is in the category with the ID of 35:</p><pre class="brush: php; title: Custom Code; notranslate">
</pre><p>This can be helpful if you want to not show a particular category in your blog (if you have a category based site setup) &#8211; or if you want to hide some categories from your search results.</p> <script type="text/javascript">sdac_post_slideshows.push({fx: 'fade', timeout: 0, speed: 1000, pause: 0,})</script>]]></content:encoded> <wfw:commentRss>http://www.sandboxdev.com/2008/01/15/exclude-single-category/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> </channel> </rss>
