<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Display a selected number of posts from one category in the sidebar</title>
	<atom:link href="http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/</link>
	<description>wordpress tricks, hacks, and tips</description>
	<lastBuildDate>Mon, 15 Mar 2010 04:02:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: NewYorkMustangs.com</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-60788</link>
		<dc:creator>NewYorkMustangs.com</dc:creator>
		<pubDate>Thu, 14 Jan 2010 07:40:24 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-60788</guid>
		<description>Thank you for this, it works great. I&#039;m trying to add a thumbnail from each post, but I can&#039;t seem to get it to load them properly, only the last post on the list. This is the code
 
&lt;.?php $postlist = get_posts(&#039;category=5&amp;numberposts=5&#039;);
 foreach ($postlist as $post) :?.&gt;
 &lt;.?php $thumb_id = get_post_thumbnail_id(); ?.&gt;
 &lt;.li&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;.&gt;
 &lt;.?php the_title(); ?.&gt;
 &lt;.br /.&gt;
 &lt;.?php the_post_thumbnail($thumb_id); ?.&gt;
 &lt;./a&gt;&lt;./li.&gt;
 &lt;.?php endforeach; ?.&gt;</description>
		<content:encoded><![CDATA[<p>Thank you for this, it works great. I&#8217;m trying to add a thumbnail from each post, but I can&#8217;t seem to get it to load them properly, only the last post on the list. This is the code<br />
 <br />
&lt;.?php $postlist = get_posts(&#8216;category=5&amp;numberposts=5&#8242;);<br />
 foreach ($postlist as $post) <img src='http://wpgarage.com/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> .&gt;<br />
 &lt;.?php $thumb_id = get_post_thumbnail_id(); ?.&gt;<br />
 &lt;.li&gt;&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221;.&gt;<br />
 &lt;.?php the_title(); ?.&gt;<br />
 &lt;.br /.&gt;<br />
 &lt;.?php the_post_thumbnail($thumb_id); ?.&gt;<br />
 &lt;./a&gt;&lt;./li.&gt;<br />
 &lt;.?php endforeach; ?.&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: debater</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-60442</link>
		<dc:creator>debater</dc:creator>
		<pubDate>Sat, 07 Nov 2009 04:15:43 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-60442</guid>
		<description>In my browser, your code is reflected as having a &quot;puzzled&quot; emoticon ;? which is obviously not what you intended (unless your php accepts cute smiley faces as valid syntax!). Would it be possible to put this as a text file download link, so that the formatting is correct? It does not work on my site - it just doesn&#039;t display anything at all.</description>
		<content:encoded><![CDATA[<p>In my browser, your code is reflected as having a &#8220;puzzled&#8221; emoticon ;? which is obviously not what you intended (unless your php accepts cute smiley faces as valid syntax!). Would it be possible to put this as a text file download link, so that the formatting is correct? It does not work on my site &#8211; it just doesn&#8217;t display anything at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sacca</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-60418</link>
		<dc:creator>Michael Sacca</dc:creator>
		<pubDate>Wed, 28 Oct 2009 06:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-60418</guid>
		<description>I&#039;d been searching for this script all night.  Thank you for posting it!</description>
		<content:encoded><![CDATA[<p>I&#8217;d been searching for this script all night.  Thank you for posting it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rik</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-60324</link>
		<dc:creator>rik</dc:creator>
		<pubDate>Tue, 22 Sep 2009 18:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-60324</guid>
		<description>I added the  hard coded the above code into my template index.php
it works great but it changes the header titles of all my pages to the title of the first post in the list?
 
any ideas</description>
		<content:encoded><![CDATA[<p>I added the  hard coded the above code into my template index.php<br />
it works great but it changes the header titles of all my pages to the title of the first post in the list?<br />
 <br />
any ideas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rik</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-60321</link>
		<dc:creator>rik</dc:creator>
		<pubDate>Mon, 21 Sep 2009 20:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-60321</guid>
		<description>I used this code and it works great. with one exception.  For some reason it takes the title of the post ( i only have 1 post in the catagory i have selected for use with this code) and places it in to the page title. So now every page on my site has the same title as the post in the side bar?</description>
		<content:encoded><![CDATA[<p>I used this code and it works great. with one exception.  For some reason it takes the title of the post ( i only have 1 post in the catagory i have selected for use with this code) and places it in to the page title. So now every page on my site has the same title as the post in the side bar?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nomercy</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-60008</link>
		<dc:creator>nomercy</dc:creator>
		<pubDate>Thu, 04 Jun 2009 11:30:37 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-60008</guid>
		<description>Thank you Miriam ... may I have permission to write back on my blog in my language

Great tips ...</description>
		<content:encoded><![CDATA[<p>Thank you Miriam &#8230; may I have permission to write back on my blog in my language</p>
<p>Great tips &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rach</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-23002</link>
		<dc:creator>rach</dc:creator>
		<pubDate>Thu, 27 Nov 2008 02:04:18 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-23002</guid>
		<description>Hey Miriam - I used the code in my topbar and it worked perfectly.  It was exactly what I needed and was so happy to find it after I spent hours searching for such a solution.  Thanks for the post.</description>
		<content:encoded><![CDATA[<p>Hey Miriam &#8211; I used the code in my topbar and it worked perfectly.  It was exactly what I needed and was so happy to find it after I spent hours searching for such a solution.  Thanks for the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SKULL 1 : Robert Sample</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-22055</link>
		<dc:creator>SKULL 1 : Robert Sample</dc:creator>
		<pubDate>Fri, 21 Nov 2008 19:40:47 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-22055</guid>
		<description>[...] 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 display the latest posts from a specific category in the sidebar. [...]</description>
		<content:encoded><![CDATA[<p>[...] 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 display the latest posts from a specific category in the sidebar. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-5608</link>
		<dc:creator>Drew</dc:creator>
		<pubDate>Fri, 15 Aug 2008 18:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-5608</guid>
		<description>Are you familiar with the Advanced Category Excluder plugin? I use it to keep some categories off my front page, and of course the one I want to show in the sidebar is also the category I don&#039;t want on my front page.

Do you know of anyway I can not have posts show up on the front page but show up on the side bar using this method?

Thanks!</description>
		<content:encoded><![CDATA[<p>Are you familiar with the Advanced Category Excluder plugin? I use it to keep some categories off my front page, and of course the one I want to show in the sidebar is also the category I don&#8217;t want on my front page.</p>
<p>Do you know of anyway I can not have posts show up on the front page but show up on the side bar using this method?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miriam Schwab</title>
		<link>http://wpgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/comment-page-1/#comment-515</link>
		<dc:creator>Miriam Schwab</dc:creator>
		<pubDate>Thu, 24 Apr 2008 04:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/display-a-selected-number-of-posts-from-one-category/#comment-515</guid>
		<description>@Noel - Sorry about the hidden code. Comments here can misbehave quite a bit. As for the problem with your code - I can&#039;t see anything wrong with it. Sorry.</description>
		<content:encoded><![CDATA[<p>@Noel &#8211; Sorry about the hidden code. Comments here can misbehave quite a bit. As for the problem with your code &#8211; I can&#8217;t see anything wrong with it. Sorry.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
