Post_per_page and several loops
-
Hello
In my theme, I have a column with posts from one category only but with TWO different lay-outs.? The first 10 posts have a larger lay-out with excerpt and thumbnail.
<?php query_posts ('posts_per_page=10&cat=6&orderby=date'); ?> <?php if (have_posts()) : ?> (bla bla bla) LAY OUT
Works ok. I have my 10 posts.
? Just below, same column, ten more posts but with smaller lay out (just thumbnail and title)
Another loop starts with the OFFSET parameter, not to repeat the first 10 posts.
<?php query_posts('posts_per_page=10&cat=6&orderby=date&offset=10'); ?> <?php if (have_posts()) : ?> (bla bla bla) LAY OUT
Ok, it starts as I want on the 11th post.
BUT PROBLEM : the second loop doesn’t stop and finally displays ALL the remaining posts of the category.
The second “post_per_page” seems not to be taken into account.
Why is that ? What shall I do ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Post_per_page and several loops’ is closed to new replies.