<?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>Digital Raindrops &#187; suppress</title>
	<atom:link href="http://digitalraindrops.net/demo/wordpress/cms-lite/tag/suppress/feed/" rel="self" type="application/rss+xml" />
	<link>http://digitalraindrops.net/demo/wordpress/cms-lite</link>
	<description>quality free wordpress themes and tutorials for your blog, themes download, wordpress templates, download wordpress theme, wordpress template</description>
	<lastBuildDate>Sat, 01 May 2010 20:56:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Hiding a Single Category</title>
		<link>http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/</link>
		<comments>http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 11:04:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Artisteer]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[hide category]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[slideshow]]></category>
		<category><![CDATA[suppress]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/</guid>
		<description><![CDATA[There are a number of different slideshows out there that require you to post the images into a category that you select, this makes updating the slideshow easy to manage, one problem with this is that you cannot hide the posts, if you make the post private then the gallery stops, lets have a look [...]]]></description>
			<content:encoded><![CDATA[<p>There are a number of different slideshows out there that require you to post the images into a category that you select, this makes updating the slideshow easy to manage, one problem with this is that you cannot hide the posts, if you make the post private then the gallery stops, lets have a look at how we can suppress the slideshow gallery in our Artisteer theme.</p>
<p><span id="more-407"></span></p>
<p>We have used this in the our wedding theme, the cu3er slideshow  <a href="http://wordpress.org/extend/plugins/cu3er-post-elements/">WordPress plugin</a> from <a href="http://18elements.com/tools/cu3er-post-elements">18Elements</a> uses a category to feed the display, when we added the images the slideshow category and the posts appeared, not a problem if the images form a part of a full post, but messy when used as placeholders.</p>
<p>View: <a href="http://digitalraindrops.net/demo/wordpress/wedding-theme/">The Wedding Theme</a>.</p>
<p>We could hardcode the category ID and exclude this, that is fine on a static theme where we already know the Category ID, but what if we wanted to make the theme available to other clients or for free download.</p>
<p>On looking for a solution for our Artisteer theme to return a category ID we could not find a simple WordPress function to use on the lists, we have to create our own function that returns a value from the database, if you have been following our tutorials then you will already have demo-functions.php file, if not you can add them to the Artisteer functions.php file.</p>
<p>Add to either your <strong>demo-functions.php</strong> or the Artisteer theme <strong>functions.php</strong></p>
<pre class="brush: php; title: ;">
function demo_get_categoryID($catName){
 global $wpdb;
 $category_slug = str_replace(&quot; &quot;,&quot;-&quot;,$catName);
 $category_slug = strtolower($category_slug);
 $thevalue = $wpdb-&gt;get_var( &quot;SELECT term_id FROM $wpdb-&gt;terms WHERE slug = '&quot; . $category_slug . &quot;'&quot; );
 if ($thevalue) {
 return $thevalue;
 }else{
 return &quot;&quot;;
 }
}
</pre>
<p>Now we need to filter the categories list to exclude the slideshow category from the menu, you can change the name as required.</p>
<p>In the Artisteer theme <strong>functions.php</strong> we will add this block of code to the code that returns the categories list, look for this line and insert the code below.</p>
<p>Find: wp_list_categories(&#8216;title_li=&#8217;); and replace with the following lines.</p>
<pre class="brush: php; title: ;">
/* Start demo Category add line */
 $exclude = demo_get_categoryID('slideshow');
 if ($exclude){
 wp_list_categories('title_li=&amp;exclude='.$exclude.'');
 }else{
 wp_list_categories('title_li=');
}
/* End demo Category add line */
</pre>
<p>So your code block should look like this:</p>
<pre class="brush: php; title: ;">
add_action('get_terms', 'art_vmenu_get_terms_filter');
 add_action('wp_list_categories', 'art_vmenu_wp_list_categories_filter');

 /* Start demo Category add line */
 $exclude = demo_get_categoryID('slideshow');
 if ($exclude){
 wp_list_categories('title_li=&amp;exclude='.$exclude.'');
 }else{
 wp_list_categories('title_li=');
 }
 /* End demo Category add line */
 remove_action('wp_list_categories', 'art_vmenu_wp_list_categories_filter');
 remove_action('get_terms', 'art_vmenu_get_terms_filter');
</pre>
<p>last step is to add our image into two Artisteer files, <strong>index.php</strong> and <strong>archive.php</strong>, look for this line and insert the code below.</p>
<p>Find: &lt;?php while (have_posts()) : the_post(); ?&gt; and paste in the following lines</p>
<pre class="brush: xml; title: ;">
&lt;!-- Start Check if our post is a slideshow post --&gt;
&lt;?php $slideCat = demo_get_categoryID('slideshow'); ?&gt;
&lt;?php if (in_category($slideCat) ) continue; ?&gt;
&lt;!-- End Check if our post is a slideshow post continue if it is --&gt;
</pre>
<p>So your code block should look like this:</p>
<pre class="brush: xml; title: ;">
&lt;?php while (have_posts()) : the_post(); ?&gt;

&lt;!-- Start Check if our post is a slideshow post --&gt;
&lt;?php $slideCat = demo_get_categoryID('slideshow'); ?&gt;
&lt;?php if (in_category($slideCat) ) continue; ?&gt;
&lt;!-- End Check if our post is a slideshow post continue if it is--&gt;
&lt;div&gt;
</pre>
<p>Now we have hidden our slideshow category from view, remember that this will hide all posts in the specified named category, so only add the category to posts you do not want displayed .</p>
<p><a href="http://digitalraindrops.net/demo/wordpress/cms-lite/files/2010/02/Untitled-12.jpg"><img class="alignnone size-full wp-image-435" title="Untitled-1" src="http://digitalraindrops.net/demo/wordpress/cms-lite/files/2010/02/Untitled-12.jpg" alt="" width="700" height="286" /></a></p>
<p>Please leave a comment if you have found this post of use to your workflow.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-mail">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-google">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-designmoo">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-ning">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-pingfm">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-bebo">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.shareaholic.com/api/share/?title=Hiding+a+Single+Category&amp;link=http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/&amp;notes=There%20are%20a%20number%20of%20different%20slideshows%20out%20there%20that%20require%20you%20to%20post%20the%20images%20into%20a%20category%20that%20you%20select%2C%20this%20makes%20updating%20the%20slideshow%20easy%20to%20manage%2C%20one%20problem%20with%20this%20is%20that%20you%20cannot%20hide%20the%20posts%2C%20if%20you%20make%20the%20post%20private%20then%20the%20gallery%20stops%2C%20lets%20have%20a%20look%20a&amp;short_link=http://b2l.me/hjmqk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=&amp;tags=&amp;ctype=" rel="nofollow" class="external" title=""></a>
		</li>
</ul><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/demo/wordpress/cms-lite/2010/02/14/hiding-a-single-category/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

