<?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>WP Garage &#187; categories</title>
	<atom:link href="http://wpgarage.com/tag/categories/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpgarage.com</link>
	<description>wordpress tricks, hacks, and tips</description>
	<lastBuildDate>Wed, 16 Nov 2011 14:36:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to exclude multiple categories from your WordPress feed</title>
		<link>http://wpgarage.com/tips/how-to-exclude-multiple-categories-from-your-wordpress-feed/</link>
		<comments>http://wpgarage.com/tips/how-to-exclude-multiple-categories-from-your-wordpress-feed/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 20:34:23 +0000</pubDate>
		<dc:creator>Miriam Schwab</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[FeedBurner]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[URI]]></category>

		<guid isPermaLink="false">?p=867</guid>
		<description><![CDATA[<p>I was searching desperately for a solution for creating a custom WordPress feed that excluded two categories that would be used to offer a unique Feedburner feed to readers. I found posts that explained how to exclude categories globally, but that wasn&#8217;t relevant since these categories still needed to be available to readers on the site. [...]</p><p>This post was originally published at <a href="http://wpgarage.com/tips/how-to-exclude-multiple-categories-from-your-wordpress-feed/">How to exclude multiple categories from your WordPress feed</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/tips/how-to-exclude-multiple-categories-from-your-wordpress-feed/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="How to exclude multiple categories from your WordPress feed" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/tips/how-to-exclude-multiple-categories-from-your-wordpress-feed/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/tips/how-to-exclude-multiple-categories-from-your-wordpress-feed/"></g:plusone></div></div><p>I was searching desperately for a solution for creating a custom WordPress feed that excluded two categories that would be used to offer a unique <a title="Feedburner" href="feeds.feedburner.com">Feedburner</a> feed to readers. I found posts that explained how to exclude categories globally, but that wasn&#8217;t relevant since these categories still needed to be available to readers on the site. Other options explained how to add parameters to the URL to exclude the feeds, as follows (the numbers are the Category IDs):</p>
<ul>
<li>http://mysite.com/feed?cat=-102&amp;cat=-103<br />
OR</li>
<li>http://mysite.com/feed?cat=-102,-103</li>
</ul>
<p>However, every time I plugged those URLs into my browser address bar to test them, the last category in the URL would disappear, and the feed would include that category.</p>
<p>I finally found this post by Kriesi: <a title="How to Modify Your WordPress RSS Feed" href="http://www.kriesi.at/archives/how-to-modify-your-wordpress-rss-feed">How to Modify Your WordPress RSS Feed</a>. It gives the same instructions for creating the exclusionary feed as many other posts, but says the following which gave me an &#8220;aha&#8221; moment:</p>
<blockquote><p>But beware, feedburner expects a slightly different syntax; insted of using ampersands you have to use commas.</p></blockquote>
<p>This made me realize that feed readers might read feeds differently than a browser. So I opened Google Reader and plugged in my custom feed. It worked! I then plugged it into Feedburner, and it worked too!</p>
<p>Why do browsers chew up the feeds?</p>
<p>This post was originally published at <a href="http://wpgarage.com/tips/how-to-exclude-multiple-categories-from-your-wordpress-feed/">How to exclude multiple categories from your WordPress feed</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/tips/how-to-exclude-multiple-categories-from-your-wordpress-feed/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Exclude Categories from Feed, Archives, Search, and Home page in WordPress</title>
		<link>http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/</link>
		<comments>http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 06:10:42 +0000</pubDate>
		<dc:creator>Rebecca Markowitz</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[categories]]></category>

		<guid isPermaLink="false">?p=611</guid>
		<description><![CDATA[<p>We often find ourselves looking for the best and easiest way to exclude categories or pages from the navigation menu, the WordPress loop, the category list, the feed, the search, and/or the archive. It&#8217;s so easy to forget one of these elements and accidentally let that category slip into the blogstream. We actually wrote about [...]</p><p>This post was originally published at <a href="http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/">Exclude Categories from Feed, Archives, Search, and Home page in WordPress</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Exclude Categories from Feed, Archives, Search, and Home page in WordPress" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/"></g:plusone></div></div><p>We often find ourselves looking for the best and easiest way to exclude categories or pages from the navigation menu, the WordPress loop, the category list, the feed, the search, and/or the archive. It&#8217;s so easy to forget one of these elements and accidentally let that category slip into the blogstream. We actually wrote about a few <a title="Exclude categories from certain pages with WordPress plugins" href="plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/">WordPress plugins that exclude categories</a> two years ago, but it&#8217;s definitely time to revisit this issue.</p>
<p>Recently, Miriam found an AMAZING plugin, <a href="http://wordpress.org/extend/plugins/simply-exclude/">Simply Exclude</a> by Paul Menard, which is basically excluding heaven&#8230; if there is such a thing.</p>
<p><img class="alignnone size-full wp-image-612" title="Exclude categories WordPress" src="http://wpgarage.com/wp-content/uploads/2010/01/simple_exclude_wp.png" alt="Exclude categories WordPress" width="400" height="98" /></p>
<h2>Advanced Category Excluder vs. Simply Exclude</h2>
<p>You may have come across the <a href="http://wordpress.org/extend/plugins/advanced-category-excluder/">Advanced Category Excluder</a> plugin, and wonder why we didn&#8217;t use that one. Here&#8217;s why:</p>
<p><strong>Advanced Category Excluder (ACE) vs.  Simply Exclude:</strong></p>
<ul>
<li>Advanced Category Excluder conflicts with the <a title="Exclude Pages plugin" href="http://wordpress.org/extend/plugins/exclude-pages/">Exclude Pages plugin</a> (described below) which excludes pages  from the nav bar. Simple Exclude does not. When I activated it ACE all the pages that had been excluded with the Exclude Pages plugin appeared on the nav bar.</li>
<li>ACE also offers you to exclude Pages, which is so annoying since you have to go through a long list of all the pages on your site to see which you want to exclude, and they appear in long lists without any indication of parent pages and sub-pages. Also, there&#8217;s no easy way to exclude pages when you are adding or editing a page.</li>
<li>With ACE you have to first publish a post in a category, and only then will that category appear in the list of categories for exclusion. This means that if you want a category to not appear in the RSS feed etc., your first post in that category has to.</li>
</ul>
<h2>How to manually exclude categories in the theme files</h2>
<p>And here are a few tips on how to exclude categories manually from the feed and the loop if you still prefer some good ol&#8217; fashioned manual labor.</p>
<p><strong>How to Manually Exclude a Category from a RSS feed</strong></p>
<p>Place the following code in your functions.php file replacing 12 with your category and commas for additional categories. Tip from <a href="http://web-kreation.com/index.php/wordpress/4-ways-to-exclude-wordpress-category-from-rss-feeds/">Web Kreation.</a></p>
<p><strong> </strong></p>
<blockquote><p><strong>function</strong> myFeedExcluder($query) {</p>
<p>if ($query-&gt;is_feed) {</p>
<p>$query-&gt;set(&#8216;cat&#8217;,'-12&#8242;);</p>
<p>}</p>
<p>return $query;</p>
<p>}</p>
<p>add_filter(&#8216;pre_get_posts&#8217;,'myFeedExcluder&#8217;);</p></blockquote>
<p><strong>How to Manually Exclude a Category in Feedburner</strong></p>
<p>Under Edit Feed Details add a ?cat=-93 or whatever the category ID number is so it comes out like:  <a href="http://ejewishphilanthropy.com/feed?cat=-93">http://domain.com/feed?cat=-93</a></p>
<p><strong>How to Manually Exclude a Category from the Loop</strong></p>
<p>Add this code <strong>BEFORE </strong>the loop and change 52 to whatever category you want to exclude</p>
<blockquote><p>&lt;?php query_posts(&#8216;showposts=2&amp;cat=-52&#8242;); ?&gt;</p></blockquote>
<h2>Bonus: Easily Exclude Pages</h2>
<p>Since we&#8217;re discussing excluding stuff from your WordPress blog, here&#8217;s a related plugin that we love called <a href="http://wordpress.org/extend/plugins/exclude-pages/">Exclude Pages</a> by Simon Wheatley. It&#8217;s easy to use and great to give clients for excluding pages from their navigation menu. Exclude Pages adds a checkbox on the edit Page page that users can click to select to exclude the Page they are working on from any place that lists all Pages, like the navigation bar.</p>
<p>This post was originally published at <a href="http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/">Exclude Categories from Feed, Archives, Search, and Home page in WordPress</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Use WP-Sticky WordPress plugin to easily create feature or &#8220;sticky&#8221; posts</title>
		<link>http://wpgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/</link>
		<comments>http://wpgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 01:57:32 +0000</pubDate>
		<dc:creator>Miriam Schwab</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[categories]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/</guid>
		<description><![CDATA[<p>The WP-Sticky WordPress plugin allows you to easily choose to &#8220;stick&#8221; certain posts at the top of your blog. This can also be done via code, as I explained in a post a few months ago where I wrote about some code that you can add to your index.php template file that will keep the [...]</p><p>This post was originally published at <a href="http://wpgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/">Use WP-Sticky WordPress plugin to easily create feature or &#8220;sticky&#8221; posts</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Use WP-Sticky WordPress plugin to easily create feature or &#8220;sticky&#8221; posts" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/"></g:plusone></div></div><p>The <a href="http://wordpress.org/extend/plugins/wp-sticky/" title="WP-Sticky WordPress plugin">WP-Sticky WordPress plugin</a> allows you to easily choose to &#8220;stick&#8221; certain posts at the top of your blog. This can also be done via code, as I explained in a post a few months ago where <a href="code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/" title="Creating a feature post or sticky post in a WordPress blog">I wrote about some code</a> that you can add to your index.php template file that will keep the latest post in your feature category at the top of your homepage. However, both the plugin and the code have advantages and disadvantages.</p>
<p>The coding method has the following advantages:</p>
<ol>
<li>By putting all your best posts in one category, you can easily highlight these posts in a number of places, like in the sidebar or on its own category page, and of course as a feature article.</li>
<li>You can give the feature post its own styling, like a different background color, which helps it stand out even more.</li>
<li>You don&#8217;t need a plugin.</li>
</ol>
<p>However, this method also has the following disadvantages:</p>
<ol>
<li>You need to create a unique category for your feature posts. Sometimes you just want to highlight certain posts without putting them in their own category. Also, your features posts will end up needing two instead of one: &#8220;Feature,&#8221; and another category that really describes the type of article.</li>
<li>With the code I gave, the feature post will appear at the top of every main page on your blog. What I mean is that if you click on &#8220;previous entries&#8221; or something like that at the bottom of the first page of your blog, the feature post will still appear at the top on the second page. This can be confusing to readers who will wonder if they have actually browsed to a new page.</li>
<li>You need to hack your template file, which isn&#8217;t for everybody.</li>
</ol>
<p>So I decided to try out another option, and settled on <a href="http://wordpress.org/extend/plugins/wp-sticky/" title="WP-Sticky">WP-Sticky</a> by Lester Chan. The explanation on the plugin page and in the <a href="http://lesterchan.net/wordpress/readme/wp-sticky.html" title="WP-Sticky Readme">readme file</a> is not clear, but I eventually came across a better explanation <a href="http://lesterchan.net/wordpress/2007/02/25/wp-sticky-new-ideas/" title="WP-Sticky New Ideas">here</a>.</p>
<p>After installing the plugin, it creates an additional box on the Write Post page at the bottom of the right-hand sidebar called Post Sticky Status. There, you have three options: Announcement, Sticky, and Normal.</p>
<p><img src="http://wpgarage.com/wp-content/uploads/2008/02/wp-sticky.png" alt="WP-Sticky WordPress plugin" /></p>
<p>If you select <strong>Announcement</strong>, that post will stay at the top of your blog forever, or at least until you define another post as an Announcement or change the post&#8217;s status to <strong>Normal</strong>. If you select <strong>Sticky</strong>, the post will stay at the top of your blog for the duration of the day on which you posted it, after which it will return to its place in the chronological order. This is good if you post multiple posts on one day, but want to highlight one of them by sticking it to the top of your blog.</p>
<p><em>Update February 20, 2008: Announcements can be styled! Here&#8217;s how:</em></p>
<p>You can style your feature posts as follows:</p>
<ol>
<li>Find the line in your index.php file that says the following:<br />
<code>&lt;div class="post"&gt;</code><br />
Note that it may say something a bit different, like it may have a different class name. Basically, it&#8217;s the code that appears before all the content related template tags in the loop, somewhere around line 13.</li>
<li>Replace that line with the following:<br />
<code>&lt;div class="post"&lt;?php if (is_announcement()) {echo " id="announcement"";} ?&gt;&gt;</code><br />
That code tells WordPress that if the post is an Announcement post, it should have a class of &#8220;post&#8221; and an id of &#8220;announcement.&#8221; This way the post keeps the styling of &#8220;post&#8221; and gets additional styling of &#8220;announcement.</li>
<li>Add the following style to your style.css file:<br />
<code>#announcement {}</code><br />
Put in the squiggly brackets whatever styles you want. Make the title a different size, color, give it a different background color, even add images like a &#8220;Feature&#8221; badge.</li>
</ol>
<p>The disadvantages to the WP-Sticky WordPress plugin are:</p>
<ol>
<li><strike>You cannot give Announcement or Sticky posts their own styling. </strike></li>
<li>You need to use a plugin.</li>
</ol>
<p><a href="http://wordpress.org/extend/plugins/wp-sticky/" title="WP-Sticky Plugin">WP-Sticky Plugin</a></p>
<p>This post was originally published at <a href="http://wpgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/">Use WP-Sticky WordPress plugin to easily create feature or &#8220;sticky&#8221; posts</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/plugins/use-wp-sticky-wordpress-plugin-to-easily-create-feature-or-sticky-posts/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Display WordPress categories in a horizontal dropdown menu</title>
		<link>http://wpgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/</link>
		<comments>http://wpgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 09:59:55 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Shorties]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/</guid>
		<description><![CDATA[<p>Anthology of Ideas shares his method for creating a horizontal drop-down menu for categories, involving the use of CSS and Javascript. Displaying WordPress categories in a horizontal dropdown menu</p><p>This post was originally published at <a href="http://wpgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/">Display WordPress categories in a horizontal dropdown menu</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Display WordPress categories in a horizontal dropdown menu" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/"></g:plusone></div></div><p>Anthology of Ideas shares his method for creating a horizontal drop-down menu for categories, involving the use of CSS and Javascript.</p>
<p><a href="http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html">Displaying WordPress categories in a horizontal dropdown menu</a></p>
<p>This post was originally published at <a href="http://wpgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/">Display WordPress categories in a horizontal dropdown menu</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/shorties/display-wordpress-categories-in-a-horizontal-dropdown-menu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Apply different themes to different categories with WordPress Themed Categories Plugin</title>
		<link>http://wpgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/</link>
		<comments>http://wpgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 08:42:43 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[categories]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/</guid>
		<description><![CDATA[<p>I&#8217;ve never come across a situation where I would need this feature, but I&#8217;d like to have this on record in case it ever comes up. Mike has developed a WordPress plugin, Themed Categories that allows the user to select different uploaded themes for different categories. According to the comments, his version doesn&#8217;t work with [...]</p><p>This post was originally published at <a href="http://wpgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/">Apply different themes to different categories with WordPress Themed Categories Plugin</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Apply different themes to different categories with WordPress Themed Categories Plugin" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/"></g:plusone></div></div><p>I&#8217;ve never come across a situation where I would need this feature, but I&#8217;d like to have this on record in case it ever comes up. Mike has developed a WordPress plugin, <a href="http://download.mikelopez.info/2006/10/17/wordpress-themed-categories-plugin/" title="WordPress Themed Categories Plugin">Themed Categories</a> that allows the user to select different uploaded themes for different categories. According to the comments, his version doesn&#8217;t work with WordPress version 2.3, so someone named <a href="http://www.gschmarri.org/">Kalle</a> made the necessary changes and the modified plugin can be downloaded <a href="http://www.gschmarri.org/wp-content/uploads/plugins/themed-categories-23.zip" title="WordPress Themed Categories Plugin">here</a> (direct link to zip download).</p>
<p><a href="http://download.mikelopez.info/2006/10/17/wordpress-themed-categories-plugin/">WordPress Themed Categories Plugin</a><a href="http://www.gschmarri.org/wp-content/uploads/plugins/themed-categories-23.zip"><br />
WordPress Themed Categories Plugin for 2.3 (direct link to zip download)<br />
</a></p>
<p>This post was originally published at <a href="http://wpgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/">Apply different themes to different categories with WordPress Themed Categories Plugin</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/plugins/apply-different-themes-to-different-categories-with-wordpress-themed-categories-plugin/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Exclude categories from certain pages with WordPress plugins</title>
		<link>http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/</link>
		<comments>http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 08:28:50 +0000</pubDate>
		<dc:creator>Miriam Schwab</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[categories]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/</guid>
		<description><![CDATA[<p>There are many situations where you want to make sure that certain categories only appear on some pages, and not on others. Here are a few WordPress plugins that can help you do this without having to hack your template files: Front Page Excluded Categories WordPress plugin &#8211; this plugin enables you to exclude posts [...]</p><p>This post was originally published at <a href="http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/">Exclude categories from certain pages with WordPress plugins</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Exclude categories from certain pages with WordPress plugins" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/"></g:plusone></div></div><p>There are many situations where you want to make sure that certain categories only appear on some pages, and not on others. Here are a few WordPress plugins that can help you do this without having to hack your template files:</p>
<p><strong><a href="http://wordpress.org/extend/plugins/front-page-excluded-categories/" title="Front Page Excluded Categories">Front Page Excluded Categories WordPress plugin</a></strong> &#8211; this plugin enables you to exclude posts from certain categories from your <em>front page</em>. This is <a href="wordpress-as-cms/display-posts-from-specific-categories-on-a-page/" title="Display posts from specific categories on a Page">possible by hard coding your template files</a> as well, but for those who want to give others the ability to do this easily, or who just don&#8217;t want to mess with their template files, this is a good solution.</p>
<p><strong><a href="http://wordpress.org/extend/plugins/advanced-category-excluder/" title="Advanced Category Excluder">Advanced Category Excluder WordPress plugin</a></strong> &#8211; this plugin gives you more flexibility over where categories appear. Here, you have access to modifying categories for five different pages on your blog: archive, home, rss posts, rss comments and search. It currently does not work for tag pages.</p>
<p>This post was originally published at <a href="http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/">Exclude categories from certain pages with WordPress plugins</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Display posts from specific categories on a Page</title>
		<link>http://wpgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/</link>
		<comments>http://wpgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 12:09:59 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[categories]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/display-posts-from-specific-categories-on-a-page/</guid>
		<description><![CDATA[<p>You may want to display posts from a specific category on the homepage or other pages of your site. For example, you might want to have a box that displays the latest three posts from your News category, or have links to your latest podcasts. In a previous post, I gave the code that would [...]</p><p>This post was originally published at <a href="http://wpgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/">Display posts from specific categories on a Page</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Display posts from specific categories on a Page" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/"></g:plusone></div></div><p>You may want to display posts from a specific category on the homepage or other pages of your site. For example, you might want to have a box that displays the latest three posts from your News category, or have links to your latest podcasts.</p>
<p><a href="code-snippets/display-a-selected-number-of-posts-from-one-category/" title="Display a selected number of posts from one category">In a previous post</a>, I gave the code that would display the latest posts from a specific category <strong>in the sidebar</strong>. However, that code will not work in the main content part of the page. In order to display posts from a specific category in the main content section of a page, you need to use a variation on the <a href="http://codex.wordpress.org/The_Loop" title="The Loop - WordPress Codex">WordPress Loop</a>, which is as follows:<br />
<code>&lt;?php query_posts('category_name=special_cat&amp;showposts=10'); ?&gt;<br />
&lt;?php while (have_posts()) : the_post(); ?&gt;<br />
&lt;!-- Do special_cat stuff... --&gt;<br />
&lt;?php endwhile;?&gt;</code></p>
<p><code></code><br />
To use this code, change the category name to whatever the name is of the relevant category, and change the number of posts displayed from 10 to whatever number you want. Where it says <code>&lt;!-- Do special_cat stuff... --&gt;</code>, put in all the code you usually use to display the title, date, category, etc. &#8211; whatever you need.</p>
<p>This post was originally published at <a href="http://wpgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/">Display posts from specific categories on a Page</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/feed/</wfw:commentRss>
		<slash:comments>95</slash:comments>
		</item>
		<item>
		<title>Creating a feature post or sticky post in a WordPress blog</title>
		<link>http://wpgarage.com/code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/</link>
		<comments>http://wpgarage.com/code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 14:19:19 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[categories]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/themes/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/</guid>
		<description><![CDATA[<p>To get a post from a specific category to appear at the top of the page above the rest of the posts, and to only change when a new post from that particular category is added, use the following code: &#60;?php /*?&#62;&#60;?php $my_query = new WP_Query('category_name=featured&#38;showposts=1'); while ($my_query-&#62;have_posts()) : $my_query-&#62;the_post(); $do_not_duplicate = $post-&#62;ID;?&#62; &#60;div class="featureItem"&#62; [...]</p><p>This post was originally published at <a href="http://wpgarage.com/code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/">Creating a feature post or sticky post in a WordPress blog</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Creating a feature post or sticky post in a WordPress blog" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/"></g:plusone></div></div><p>To get a post from a specific category to appear at the top of the page above the rest of the posts, and to only change when a new post from that particular category is added, use the following code:</p>
<p><code>&lt;?php /*?&gt;&lt;?php $my_query = new WP_Query('category_name=featured&amp;showposts=1');</p>
<p>while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();</p>
<p>$do_not_duplicate = $post-&gt;ID;?&gt;</p>
<p>&lt;div class="featureItem"&gt;</p>
<p>&lt;h1&gt;Feature: &lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;<br />
&lt;p&gt;&lt;?php the_time('F j, Y'); ?&gt; • By &lt;?php the_author_firstname(); ?&gt; &lt;?php the_author_lastname(); ?&gt;&lt;br /&gt;Tags: &lt;?php STP_PostTags(); ?&gt; | &lt;?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?&gt;&lt;/p&gt;<br />
&lt;?php the_content('Read more»'); ?&gt;<br />
&lt;/p&gt;</p>
<p>&lt;!--</p>
<p>&lt;?php trackback_rdf(); ?&gt;</p>
<p>--&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;?php endwhile; ?&gt;</p>
<p>&lt;?php if (have_posts()) : while (have_posts()) : the_post(); if( $post-&gt;ID == $do_not_duplicate )</p>
<p>continue;?&gt;&lt;?php */?&gt;</code></p>
<p>Obviously, many things above can be changed, like how the titles, categories, tags, etc. are displayed.</p>
<p>This post was originally published at <a href="http://wpgarage.com/code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/">Creating a feature post or sticky post in a WordPress blog</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/creating-a-feature-post-or-sticky-post-in-a-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Display a selected number of posts from one category in the sidebar</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/</link>
		<comments>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 14:08:10 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[sidebar]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/</guid>
		<description><![CDATA[<p>&#60;?php$postlist = get_posts('category=6&#38;numberposts=5'); foreach ($postlist as $post) &#62;&#60;li&#62;&#60;a href="&#60;?php the_permalink(); ?&#62;"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;/li&#62;&#60;?php endforeach; ?&#62; Use this in the sidebar to display a defined number of posts from a specified category. Where it says &#8220;category=6&#8243; replace the 6 with the relevant category ID number, and where it says &#8220;numberposts=5&#8243; replace the 5 with the number [...]</p><p>This post was originally published at <a href="http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/">Display a selected number of posts from one category in the sidebar</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Display a selected number of posts from one category in the sidebar" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/"></g:plusone></div></div><p><code>&lt;?php$postlist = get_posts('category=6&amp;numberposts=5');<br />
foreach ($postlist as $post) <img src='http://wpgarage.com/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> &gt;&lt;li&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;&lt;?php endforeach; ?&gt;</code></p>
<p>Use this in the sidebar to display a defined number of posts from a specified category. Where it says &#8220;category=6&#8243; replace the 6 with the relevant category ID number, and where it says &#8220;numberposts=5&#8243; replace the 5 with the number of posts that you want to appear.</p>
<p><em>Update Nov. 7, 2007:</em></p>
<p>The above code snippet can also be used to display a page in the sidebar. This is is handy if you want to create an editable chunk of text in the sidebar without using widgets. So, for example, if you want to show an excerpt of your About page in your sidebar, use the following code:<br />
<code><br />
&lt;?php$postlist = get_posts('id=54');<br />
foreach ($postlist as $post) <img src='http://wpgarage.com/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> &gt;&lt;?php the_excerpt(); ?&gt;<br />
&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;read more&lt;/a&gt;</code></p>
<p>Where it says id=54, replace 54 with the id number of the page you want to display.</p>
<p>This post was originally published at <a href="http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/">Display a selected number of posts from one category in the sidebar</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Giving different styles to different WordPress categories</title>
		<link>http://wpgarage.com/tips/giving-different-styles-to-different-wordpress-categories/</link>
		<comments>http://wpgarage.com/tips/giving-different-styles-to-different-wordpress-categories/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 09:02:01 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[categories]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/tips/giving-different-styles-to-different-wordpress-categories/</guid>
		<description><![CDATA[<p>WordPress allows you to give different styles to different categories in a range of ways. You can style a category page: this means that every category page can have its own unique style. For example, let&#8217;s say you have a site about vegetables, where every vegetable is a category. You can style the Tomato category [...]</p><p>This post was originally published at <a href="http://wpgarage.com/tips/giving-different-styles-to-different-wordpress-categories/">Giving different styles to different WordPress categories</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/tips/giving-different-styles-to-different-wordpress-categories/" data-url="http://RATE_LIMIT_EXCEEDED" data-text="Giving different styles to different WordPress categories" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/tips/giving-different-styles-to-different-wordpress-categories/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/tips/giving-different-styles-to-different-wordpress-categories/"></g:plusone></div></div><p><a href="http://wordpress.org" title="WordPress">WordPress</a> allows you to give different styles to different categories in a range of ways. You can style a category page: this means that every category page can have its own unique style. For example, let&#8217;s say you have a site about vegetables, where every vegetable is a category. You can style the Tomato category page so that the headers are all in red, the Carrot category page so that the headers are all orange, etc.</p>
<p>You can also make sure that when you visit a single post page in a specific category, that page also has a unique style. So if someone clicks on your post about Delicious Tomato Sauce, the headers on that page can be styled red, while the single post page for the article on Creamy Carrot Soup will have orange headers.</p>
<p>And finally, I just found out that you can style posts on the index, home page, search results page, or any page with posts from multiple categories, with their own style depending on their category.</p>
<p>Let&#8217;s go through each styling method one-by-one:</p>
<p><strong>Styling Category pages</strong></p>
<ol>
<li>Find out what the id number is of the category you want to style. To do so, go to Manage &gt; Categories, find the category in question, and look at the left-hand column. Let&#8217;s say that your Tomato category has an id of 5.</li>
<li>Create a file called category-x.php, where x is the id number of the category. In the case of the Tomato category, your file will be called category-5.php. The best way to do this is to copy you index.php file, and rename it category-5.php.</li>
<li> Now modify your file at will. For example, if you want all <code>h2</code> text to be red, find where it says <code>&lt;h2&gt;</code> in your file, and replace it with something like <code>&lt;h2 class="tomato-red"&gt;</code>. Then, in your style.css file, create a class called tomato-red, and give it the right styles. In this case, you would add the following to your style sheet:<br />
<code>.tomato-red {<br />
color: #FF0000;<br />
}</code></li>
<li>The method described above in Step 3 is ok if you want to customize the styles for one or two categories. But if you have more than that, it can become annoying to manage a zillion category-x.php files. <a href="http://ryanhellyer.net/" title="Ryan Hellyer">Ryan Hellyer</a>, a devoted WordPressGargage reader and most frequent commenter, gave the following more efficient way of doing this. He said to create one category.php file, and put the following code in it:<br />
<code>&lt;h2<br />
&lt;?php<br />
if (is_category('tomato'))<br />
{echo  'class="tomato-red"';}<br />
if (is_category('cucumber'))<br />
{echo  'class="cucumber-green"';}<br />
?&gt;</code><br />
Etc. Brilliant!</li>
</ol>
<p><strong>Styling single post pages for different categories</strong></p>
<p>See my previous post titled &#8220;<a href="tips/displaying-single-post-pages-differently-in-specific-categories/" rel="bookmark">Displaying single post pages differently in specific categories&#8221;</a> for detailed instructions on styling single post pages for different categories.  It&#8217;s all there.</p>
<p><strong>Giving posts from different categories different styles on a multi-category page</strong></p>
<p>I love how there&#8217;s always something new to learn about WordPress! <a href="http://ifacethoughts.net/">Abhijit Nadgouda</a> has written a post on Lorelle&#8217;s blog explaining how you can <a href="http://lorelle.wordpress.com/2007/09/06/using-wordpress-categories-to-style-posts/" title="Using WordPress Categories To Style Posts">apply unique styles to posts in different categories</a>. He explains how you can use the category slugs to create styles that can be dynamically called to give different styles to posts from certain categories.</p>
<p>Why is this useful? Let&#8217;s take our vegetable site example. By giving each category its own style, a reader on the home page could easily identify all posts about tomatoes by picking out the posts with red headers, and carrot posts would have orange headers. This could also create a very colorful and eye-catching page.</p>
<p>Another way to use is if you have a category of feature articles. You want these articles to stand out in some way, either by giving them some kind of badge, or a background color, for example. By using this method, you can ensure that your feature articles are always more prominent, and don&#8217;t get lost in the crowd.</p>
<p>So there you have it &#8211; three ways to make sure your posts in different categories stand out all across your site. Hurray for WordPress!</p>
<p>This post was originally published at <a href="http://wpgarage.com/tips/giving-different-styles-to-different-wordpress-categories/">Giving different styles to different WordPress categories</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/tips/giving-different-styles-to-different-wordpress-categories/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

