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.
Like
cat 1 :
Post 1
Post 2
cat 2:
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.
Thanks andy_unleash <?php query_posts("posts_per_page=2"); ?>
In the above code , where should put parameter for category , what modification I need to do .
[I am new in wp theme development ]
Your best bet is to have a good read of the Query Posts Codex
In particular the examples and parameters section - parameters & categories etc
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.
Like
cat 1 :
Post 1
Post 2
cat 2:
Post 1
Post 2
cat 3 :
Post 1
Post 2
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.
Thanks andy_unleash <?php query_posts("posts_per_page=2"); ?>
In the above code , where should put parameter for category , what modification I need to do .
[I am new in wp theme development ]
Your best bet is to have a good read of the Query Posts Codex
In particular the examples and parameters section - parameters & categories etc