Loop division and pagination
-
Hi all!
Ok, here is my quest :
I would like to divide my loop on my category/index/archives templates.
I would simply put a banner between the first posts and the folowing posts.
======================
First post in the loop
======================[—BANNER—]
======================
All the folowing posts
======================And I want to keep this schema over the pagination, ie when I browse the older posts in category/archive/etc.
Normally, I would do so with :
[1] A query posts with showposts=1 = Display only one posts.
[2] The banner I want to display
[3] A query posts with offset=1 = Display all folowing posts.
But this method wont works with the pagination to browse older posts.
I know how to get the pagination working with a single query_posts, with this code :
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
But it doesn’t seems to solve my actual problem with two loops…
Am I clear enough? Anybody have an idea?
Thanks!
S.
- The topic ‘Loop division and pagination’ is closed to new replies.