<?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; WordPress functions</title> <atom:link href="http://www.sandboxdev.com/tag/wordpress-functions/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>HOWTO: Add a Custom Comment Class to WordPress</title><link>http://www.sandboxdev.com/2009/11/30/howto-add-a-custom-comment-class-to-wordpress/</link> <comments>http://www.sandboxdev.com/2009/11/30/howto-add-a-custom-comment-class-to-wordpress/#comments</comments> <pubDate>Mon, 30 Nov 2009 17:03:20 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[SDAC Blog]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Logic]]></category> <category><![CDATA[comment_class]]></category> <category><![CDATA[WordPress functions]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/?p=782</guid> <description><![CDATA[Ever need to add your own class to your WordPress comment template but not sure how because of the function comment_class that controls the classes? Check out the function comment_class and you will see adding your own custom classes very easily. Allow this sounds pretty basic &#8211; it is a lifesaver for doing a lot [...]]]></description> <content:encoded><![CDATA[<p>Ever need to add your own class to your WordPress comment template but not sure how because of the function comment_class that controls the classes?  Check out the function <a
href="http://codex.wordpress.org/Template_Tags/comment_class" target="_blank">comment_class</a> and you will see adding your own custom classes very easily.</p><pre class="brush: php; title: Custom Code; notranslate">
</pre><p>Allow this sounds pretty basic &#8211; it is a lifesaver for doing a lot of customizations.</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/2009/11/30/howto-add-a-custom-comment-class-to-wordpress/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Show One WordPress Post</title><link>http://www.sandboxdev.com/2008/11/04/show-one-wordpress-post/</link> <comments>http://www.sandboxdev.com/2008/11/04/show-one-wordpress-post/#comments</comments> <pubDate>Wed, 05 Nov 2008 02:47:23 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[SDAC Blog]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Logic]]></category> <category><![CDATA[get_post]]></category> <category><![CDATA[WordPress functions]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/?p=411</guid> <description><![CDATA[There is a great function you might be aware of that allows you to get one WordPress post and display it anywhere you would like (header, sidebar, home page, etc). To show only one post, use the function get_post. Example: The code above will show the title and content of the post with the post [...]]]></description> <content:encoded><![CDATA[<p>There is a great function you might be aware of that allows you to get one WordPress post and display it anywhere you would like (header, sidebar, home page, etc).</p><p>To show only one post, use the function <a
href="http://codex.wordpress.org/Function_Reference/get_post">get_post</a>.</p><p><strong>Example:</strong></p><pre class="brush: php; title: Custom Code; notranslate">
post_title;
$sdac_content = $show_post_id-&amp;gt;post_content;
?&amp;gt;
&lt;h2&gt;&lt;/h2&gt;
</pre><p>The code above will show the title and content of the post with the post ID of 10.  If you are not sure what your post ID is, go to the manage screen in the WP-Admin, and hover over the post title.  In your browser status bar, you will see the URL &#8211; and the post ID is the number at the end of the URL.</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/11/04/show-one-wordpress-post/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Search Specific Category in WordPress</title><link>http://www.sandboxdev.com/2007/10/10/search-specific-category-in-wordpress/</link> <comments>http://www.sandboxdev.com/2007/10/10/search-specific-category-in-wordpress/#comments</comments> <pubDate>Thu, 11 Oct 2007 01:49:33 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Logic]]></category> <category><![CDATA[search]]></category> <category><![CDATA[WordPress categories]]></category> <category><![CDATA[WordPress customizations]]></category> <category><![CDATA[WordPress functions]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/2007/10/10/search-specific-category-in-wordpress.php</guid> <description><![CDATA[There are some times when you want to limit your search to a particular category, or perhaps multiple categories. This is relatively simple to do in WordPress by adding a hidden field to your search code. (See example below) You can see I added my hidden input field on the third line. When I add [...]]]></description> <content:encoded><![CDATA[<p>There are some times when you want to limit your search to a particular category, or perhaps multiple categories. This is relatively simple to do in WordPress by adding a hidden field to your search code. (See example below)</p><pre class="brush: php; title: Custom Code; notranslate">
&lt;form method=&quot;get&quot; id=&quot;search form&quot; action=&quot;/&quot;&gt;
&lt;div&gt;
&lt;input type=&quot;text&quot; value=&quot;&quot; name=&quot;s&quot; id=&quot;s&quot; /&gt;
&lt;input type=&quot;hidden&quot; value=&quot;22&quot; name=&quot;cat&quot; id=&quot;scat&quot; /&gt;
&lt;/div&gt;
&lt;/form&gt;
</pre><p>You can see I added my hidden input field on the third line.  When I add this in, it then adds onto the query used to search. Your search will go from something like http://www.sandboxdev.com/?s=WordPress to http://www.sandboxdev.com/?s=WordPress&amp;cat=22 and will only return posts in the category ID you choose.</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/2007/10/10/search-specific-category-in-wordpress/feed/</wfw:commentRss> <slash:comments>53</slash:comments> </item> </channel> </rss>
