Limit posts per category in query_posts?
-
How do I limit the number of posts per category in query_posts? Here is my current code:
query_posts("cat=19,18,7&paged=$page&posts_per_page=$posts");Right now it displays all posts from each specified category, chronologically. I want it to show only the latest posts from each category. Setting
posts_per_pagedoesn’t work as it displays the latest X posts regardless of category (ex. if I set it to 3, and the latest 3 posts happen to all be from category 19, then it shows those 3 posts from cat 19 and none from the other assigned categories.)Is there such thing as
posts_per_cator something similar?
The topic ‘Limit posts per category in query_posts?’ is closed to new replies.