What about using the offset argument?
See query_posts()
The offset is definitely useful, but I don’t quite how to do exactly what I want with it: Show ALL categories EXCEPT (offset 4) the most recent posts in a certain category only. If I do:
numberposts=-1&cat=9129&offset=4&orderby=post_date&showposts=10
It offsets the most recent 4 posts in category 9129, but doesn’t show posts in all the other categories. If I just did:
numberposts=-1&offset=4&orderby=post_date&showposts=10 It would exclude the most recent 4 posts regardless of category, which is also not what I want.
I don’t know how else I could use these parameters to achieve what I want.
Okay, I understand what you want to do, but you can’t get there with a single query_posts. You’d have to do 2 different queries, one to 4 posts from category 9129 that you want to offset, then using those post IDs construct a 2nd query with post__not_in.
Thread Starter
adria
(@adria)
thanks, this got me what I needed. I just made two queries:
numberposts=-1&cat=9129&offset=4&orderby=post_date&showposts=4
and
numberposts=-1&cat=-9129&orderby=post_date&showposts=6
The first one gets that category I wanted, except the 4 most recent.
The second one gets the rest of the categories, excluding the category that I got above. Thanks for your help!
Hi Adria,
Any chance you could show how exactly you made these two queries?
I have exactly the same problem as yourself.
Thanks
James