Three Loops, Please…
-
Greetings, all!
I need to build a page that has three loops running on it:
- Each loop only displays posts from one category.
- Each loop only displays the four most recent posts from that category.
- No post will ever appear in more than one of these categories (enforced, for now, by editorial policy/practice rather than programmatically).
- The loops will always appear in the same order.
- There are no additional versions/implementations of this page that will vary the above patterns or quantities.
I’ve already looked into various possibilities (wp_query, query_posts, etc), but each of the examples I’ve found runs me into a wall (forcing a loop that cannot narrow down to one category, building a loop that depends upon a counter that is invalidated by [if (in_category(x) continue], etc).
So before I embark on an open ended experiment with every example out there (to say nothing about my concerns regarding an experiment that appears to work but comes back to bite me later), I’d like to ask here:
- Does anyone here have any advice on how to pursue this?
- Does anyone here have any working examples that are known to have survived ongoing use?
TIA!
Gilad
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Three Loops, Please…’ is closed to new replies.