I'm trying to make a page with multiple loops, I need every loop to display a predefined number of posts from the same category (every loop displays X number of posts from Category CATS). But I also need the second loop, the third loop and so on to display the posts from where the last loop stopped, without duplicating content (example: loop 1 from post 1 to 5. loop 2 from post 6 to 10. loop 3 from post 11 to 15 etc.). Here's what I've tried so far (I also gave a try to the code in the wordpress codex, but nothing seems to work)
Can you help me?
here's my code so far;
<?php if (have_posts()) : ?>
<?php $mosaics = new WP_Query('category_name=mosaics&posts_per_page=5'); ?>
<?php while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
<?php if( $post->ID == $do_not_duplicate ) continue; ?>
<?php echo get_the_content(); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
<br />
<?php if (have_posts()) : ?>
<?php $mosaics = new WP_Query('category_name=mosaics&posts_per_page=4'); ?>
<?php while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
<?php if( $post->ID == $do_not_duplicate ) continue; ?>
<?php echo get_the_content(); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
<br />
<?php if (have_posts()) : ?>
<?php $mosaics = new WP_Query('category_name=mosaics&posts_per_page=3'); ?>
<?php while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
<?php if( $post->ID == $do_not_duplicate ) continue; ?>
<?php echo get_the_content(); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
<br />
<?php if (have_posts()) : ?>
<?php $mosaics = new WP_Query('category_name=mosaics&posts_per_page=2'); ?>
<?php while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
<?php if( $post->ID == $do_not_duplicate ) continue; ?>
<?php echo get_the_content(); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>