Suppose I have 3 categories (cat 1 , cat 2 , cat 3) , and my blog home page shows 6 recent posts . I want to show 2 recent posts from every category.
cat 1 :
cat 3 :
how can I do it ? Thanks in advance
You will probably need to run 3 separate query loops to do what you need, specifying the different categories and number of posts in each.
< ?php query_posts("posts_per_page=2"); ?>
In the above code , where should put parameter for category , what modification I need to do .
Your best bet is to have a good read of the [Query Posts Codex](http://codex.wordpress.org/Function_Reference/query_posts)
In particular the examples and parameters section – [parameters & categories etc](http://codex.wordpress.org/Function_Reference/query_posts#Examples)
You must be logged in to reply to this topic.
Search for Stuff
Browse the Archives
Get the Newsletter
... or get the RSS feed