<?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: WordPress: display posts from certain category</title> <atom:link href="http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/feed/" rel="self" type="application/rss+xml" /><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/</link> <description>Get your PSD sliced into the XHTML valid Wordpress theme. SramekDesign offers cheap and fast PSD to Wordpress conversion service.</description> <lastBuildDate>Mon, 12 Sep 2011 02:48:26 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Florian</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-2615</link> <dc:creator>Florian</dc:creator> <pubDate>Wed, 23 Mar 2011 12:15:44 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-2615</guid> <description>This is great code. But, on my site shows the code the posts, from the good category, but this shows it 5 times. 1 time is needed :) What can I do?</description> <content:encoded><![CDATA[<p>This is great code. But, on my site shows the code the posts, from the good category, but this shows it 5 times. 1 time is needed <img
src='http://www.sramekdesign.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> What can I do?</p> ]]></content:encoded> </item> <item><title>By: xenomorf</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-2562</link> <dc:creator>xenomorf</dc:creator> <pubDate>Tue, 15 Mar 2011 00:09:49 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-2562</guid> <description>wow.. thank you very much sir for this tutorial. i wasted a few hours of my precious time just to figure how to display the last five post. i never thought of using WP_QUERY().thank you!</description> <content:encoded><![CDATA[<p>wow.. thank you very much sir for this tutorial. i wasted a few hours of my precious time just to figure how to display the last five post. i never thought of using WP_QUERY().</p><p>thank you!</p> ]]></content:encoded> </item> <item><title>By: Mark Priestap</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-1771</link> <dc:creator>Mark Priestap</dc:creator> <pubDate>Fri, 21 Jan 2011 04:10:23 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-1771</guid> <description>Outstanding. Thanks for the huge tip.</description> <content:encoded><![CDATA[<p>Outstanding. Thanks for the huge tip.</p> ]]></content:encoded> </item> <item><title>By: Chris Boggs</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-1740</link> <dc:creator>Chris Boggs</dc:creator> <pubDate>Thu, 06 Jan 2011 19:42:55 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-1740</guid> <description>Just a thanks man. This solution is greatly appreciated! -c-</description> <content:encoded><![CDATA[<p>Just a thanks man. This solution is greatly appreciated! -c-</p> ]]></content:encoded> </item> <item><title>By: Chad Buie</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-1076</link> <dc:creator>Chad Buie</dc:creator> <pubDate>Fri, 19 Nov 2010 00:03:48 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-1076</guid> <description>Where exactly are you using this snippet of code for your application? Is it within the heirachy of Wordpress or outside the blog directory. Because if it is not working you will need to add this to the top of each page to render the post from each category:::[php]&lt;?php
// Include Wordpress
define(&#039;WP_USE_THEMES&#039;, false);
require(&#039;./blog/wp-load.php&#039;);
query_posts(&#039;showposts=7&#039;);
?&gt;[/php]hope this helps...i know this is really late...oh well anyone else get stuck or Google picks up the content please reply back..</description> <content:encoded><![CDATA[<p>Where exactly are you using this snippet of code for your application? Is it within the heirachy of WordPress or outside the blog directory. Because if it is not working you will need to add this to the top of each page to render the post from each category:::</p><pre class="brush: php; title: ; notranslate">

&lt;?php
// Include WordPress
define('WP_USE_THEMES', false);
require('./blog/wp-load.php');
query_posts('showposts=7');
?&gt;
</pre><p>hope this helps&#8230;i know this is really late&#8230;oh well anyone else get stuck or Google picks up the content please reply back..</p> ]]></content:encoded> </item> <item><title>By: Chad Buie</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-1075</link> <dc:creator>Chad Buie</dc:creator> <pubDate>Thu, 18 Nov 2010 23:43:23 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-1075</guid> <description>Awww man this is killer...this is really powerful stuff...especially considering the use for PHP anyway is a feat in itself. But thanks for illustrating how to use the query class to and use the id of the post...appreciate it much...you should have a donation button up man..saved me hours..</description> <content:encoded><![CDATA[<p>Awww man this is killer&#8230;this is really powerful stuff&#8230;especially considering the use for PHP anyway is a feat in itself. But thanks for illustrating how to use the query class to and use the id of the post&#8230;appreciate it much&#8230;you should have a donation button up man..saved me hours..</p> ]]></content:encoded> </item> <item><title>By: Free and Premium Wordpress Themes</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-1010</link> <dc:creator>Free and Premium Wordpress Themes</dc:creator> <pubDate>Wed, 13 Oct 2010 08:12:30 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-1010</guid> <description>Thanks for sharing this tip</description> <content:encoded><![CDATA[<p>Thanks for sharing this tip</p> ]]></content:encoded> </item> <item><title>By: Lou Sparx</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-940</link> <dc:creator>Lou Sparx</dc:creator> <pubDate>Mon, 27 Sep 2010 20:11:12 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-940</guid> <description>Tried it everywhere and still only shows the last posts of the entire blog.If I use cat=1 it shows the last posts of the blog but cat=2 cat=3+ shows NO results?</description> <content:encoded><![CDATA[<p>Tried it everywhere and still only shows the last posts of the entire blog.</p><p>If I use cat=1 it shows the last posts of the blog but cat=2 cat=3+ shows NO results?</p> ]]></content:encoded> </item> <item><title>By: Tom</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-939</link> <dc:creator>Tom</dc:creator> <pubDate>Mon, 27 Sep 2010 16:24:18 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-939</guid> <description>no you have to put it outside of loop</description> <content:encoded><![CDATA[<p>no you have to put it outside of loop</p> ]]></content:encoded> </item> <item><title>By: Lou Sparx</title><link>http://www.sramekdesign.com/wordpress/wordpress-display-posts-from-certain-category/comment-page-2/#comment-938</link> <dc:creator>Lou Sparx</dc:creator> <pubDate>Mon, 27 Sep 2010 15:24:18 +0000</pubDate> <guid
isPermaLink="false">http://www.sramekdesign.com/?p=185#comment-938</guid> <description>Doesn&#039;t work with 3.0. cat=1 cat=5 etc.... all show the last posts from your BLOG not from any specific category :(I put this in the loop, right?....
[php]&lt;h3&gt;Last posts&lt;/h3&gt;
&lt;?php $recent = new WP_Query(); ?&gt;
&lt;?php $recent-&gt;query(&#039;cat=1&amp;showposts=5&#039;); ?&gt;
&lt;?php while($recent-&gt;have_posts()) : $recent-&gt;the_post(); ?&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;
&lt;?php the_title(); ?&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;?php endwhile; ?&gt;[/php]Any help please?</description> <content:encoded><![CDATA[<p>Doesn&#8217;t work with 3.0. cat=1 cat=5 etc&#8230;. all show the last posts from your BLOG not from any specific category <img
src='http://www.sramekdesign.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p><p>I put this in the loop, right?&#8230;.</p><pre class="brush: php; title: ; notranslate">&lt;h3&gt;Last posts&lt;/h3&gt;
&lt;?php $recent = new WP_Query(); ?&gt;
&lt;?php $recent-&gt;query('cat=1&amp;showposts=5'); ?&gt;
&lt;?php while($recent-&gt;have_posts()) : $recent-&gt;the_post(); ?&gt;
&lt;ul&gt;
	&lt;li&gt;
            &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;
            &lt;?php the_title(); ?&gt;
            &lt;/a&gt;
       &lt;/li&gt;
&lt;/ul&gt;
&lt;?php endwhile; ?&gt;</pre><p>Any help please?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic (User agent is rejected)
Database Caching 4/24 queries in 0.035 seconds using disk: basic
Object Caching 392/407 objects using disk: basic
Content Delivery Network via N/A

Served from: www.sramekdesign.com @ 2012-02-04 04:59:09 -->
