<?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>More Than Scratch The Surface &#187; tips</title>
	<atom:link href="http://www.scratch99.com/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scratch99.com</link>
	<description>A Journey In Web Development</description>
	<lastBuildDate>Mon, 30 Aug 2010 23:52:14 +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>Advanced WordPress Admin Tip: Posts By Category</title>
		<link>http://www.scratch99.com/2010/01/advanced-wordpress-admin-tip-posts-by-category/</link>
		<comments>http://www.scratch99.com/2010/01/advanced-wordpress-admin-tip-posts-by-category/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 13:51:06 +0000</pubDate>
		<dc:creator>Stephen Cronin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.scratch99.com/?p=240</guid>
		<description><![CDATA[Copyright © 2010 Stephen Cronin. Visit the original article at http://www.scratch99.com/2010/01/advanced-wordpress-admin-tip-posts-by-category/.Go to Posts -&#62; Edit in the WordPress Admin area and you&#8217;ll see a list of all the posts you have. There is a dropdown list called View all categories, which allows you to select a single category to view posts from. But&#8230; What if [...]]]></description>
			<content:encoded><![CDATA[Copyright © 2010 <a href="http://www.scratch99.com">Stephen Cronin</a>. Visit the original article at <a href="http://www.scratch99.com/2010/01/advanced-wordpress-admin-tip-posts-by-category/">http://www.scratch99.com/2010/01/advanced-wordpress-admin-tip-posts-by-category/</a>.<br /><p>Go to Posts -&gt; Edit in the WordPress Admin area and you&#8217;ll see a list of all the posts you have. There is a dropdown list called View all categories, which allows you to select a single category to view posts from. But&#8230;</p>
<p>What if you want to <strong>view posts from more than one category</strong>, or better yet, want to <strong>exclude posts from certain categories</strong>? Can&#8217;t do it right? Well not through the WordPress interface, but you can do it through URL parameters.</p>
<h2>Finding Out Your Category Numbers</h2>
<p>To make this work, you&#8217;ll need to know the category numbers for your categories. You can find these through either of the following two methods:</p>
<ol>
<li>Go to Posts -&gt; Category screen and hold your mouse over the category in question. In your browser&#8217;s status bar you will see a URL which ends in ID=xx (xx is the number of the category). </li>
</ol>
<p>OR</p>
<ol start="2">
<li>While still in Posts -&gt; Edit, select the category you want in the dropdown list and click Filter. You&#8217;ll be taken to a page showing only posts from that category. In the browser&#8217;s address bar you&#8217;ll see that the URL contains cat=xx (xx is the number of the category). </li>
</ol>
<p>The first method is quicker if you want to look up multiple category numbers (you may want to write them down). The second method is better if you&#8217;re just after one or two category numbers &#8211; you&#8217;ll need to do this step anyway.</p>
<h2>First Step</h2>
<p>By default, the Posts -&gt; Edit screen has a URL that ends in wp-admin/edit.php with no parameters, eg:</p>
<p class="codebox">http://www.scratch99.com/wp-admin/edit.php</p>
<p>Rather than typing all the parameters, it makes sense to start with a URL that includes them. </p>
<p>If you haven&#8217;t already, select one of the categories you want to include / exclude in the dropdown list and click Filter. You&#8217;ll be taken to a page showing only posts from that category, but you will now have a URL that looks like this:</p>
<p class="codebox">http://www.scratch99.com/wp-admin/edit.php?s&amp;mode=list&amp;action=-1&amp;m=0&amp;cat=92&amp;action2=-1</p>
<p>We&#8217;re going to be changing the cat=xx part of the URL.</p>
<div class="csstextbox1">Note: Don&#8217;t bother trying to use the URLs in this post. My <a href="http://www.scratch99.com/2008/10/password-protecting-the-wp-admin-folder/">wp-admin section is password protected</a>, so all you&#8217;ll get is the password prompt.</div>
<h2>Displaying Posts From More Than One Category</h2>
<p>Perhaps I want to display posts from more than one category &#8211; in my case, I may want to see all the posts from my WordPress and Web Development categories, but not from the rest of my categories (too much noise).</p>
<p>Easy. Simply edit the URL and change the cat=xx to cat=xx,xx (where xx is the category numbers that you want). In my case, I change the URL to the following (note the cat=4,65):</p>
<p class="codebox">http://www.scratch99.com/wp-admin/edit.php?s&amp;mode=list&amp;action=-1&amp;m=0&amp;cat=4,65&amp;action2=-1</p>
<p>Want posts from three categories? That&#8217;s right: </p>
<p class="codebox">cat=xx,xx,xx</p>
<p>You&#8217;ve got it now!</p>
<h2>Excluding Posts From Certain Categories</h2>
<p>It&#8217;s also possible to exclude posts from certain categories from appearing in the Posts -> Edit screen.</p>
<p>Why would I want to exclude posts from certain categories? Actually, that&#8217;s how I started looking into this issue. I haven&#8217;t been posting much recently and, as a result, my weekly automatic lifestream digest posts pretty much filled up the screen: </p>
<p><img src="http://www.scratch99.com/wp-content/uploads/2010/01/edit-posts-1.png" alt="too many noisy entries in Edit Posts list" width="500" height="627" /></p>
<p>I was having trouble seeing my real posts! </p>
<p>Thankfully it&#8217;s easy to <strong>exclude the category that these posts are in</strong>. Simply edit the URL and change the cat=xx to cat=-xx (where xx is the category number you want). In my case, I change the URL to the following (note the minus sign, eg: cat=-92):</p>
<p class="codebox">http://www.scratch99.com/wp-admin/edit.php?s&amp;mode=list&amp;action=-1&amp;m=0&amp;cat=-92&amp;action2=-1</p>
<p>The result:</p>
<p><img src="http://www.scratch99.com/wp-content/uploads/2010/01/edit-posts-2.png" alt="A much better list with unnecessary posts removed" width="500" height="155" /></p>
<p>Want to exclude posts from more than one category? That&#8217;s right: </p>
<p class="codebox">cat=-xx,-xx,-xx</p>
<div class="csstextbox1">Note: I follow the rule of having one category per post. I&#8217;m not quite sure what will happen if your posts have more than one category. Will they show up if you exclude one of the categories that they&#8217;re in? Probably, because they are also in a category you are including, but I don&#8217;t know for sure.</div>
<h2>Final Thoughts</h2>
<p>That&#8217;s all &#8211; it&#8217;s a fairly long post for a fairly simple tip. It&#8217;s probably not something that will be needed often, but in some circumstances it&#8217;s very useful to have <strong>greater control over which posts appear on the Edit Posts screen</strong>.</p>
<script type="text/javascript">Nifty("div.csstextbox1","bgcolor-#FFFFFF");</script>]]></content:encoded>
			<wfw:commentRss>http://www.scratch99.com/2010/01/advanced-wordpress-admin-tip-posts-by-category/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)
Database Caching using disk
Object Caching 386/395 objects using disk

Served from: www.scratch99.com @ 2010-09-06 21:48:29 -->