I know this has been discussed before but I can't seem to make it work with any of the solution posted in other topics.
How can I make pagination to work on a loop like this:
<div id="first-loop-container">
<?php $my_query = new WP_Query('showposts=5'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<h4>" title="<?php the_title(); ?>"><?php the_title(); ?></h4>
<?php the_content(" More...",TRUE,''); ?>
<?php endwhile; ?>
</div>
<div id="second-loop-container">
<?php $my_query = new WP_Query('showposts=5&offset=5'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<h4>" title="<?php the_title(); ?>"><?php the_title(); ?></h4>
<?php the_content(" More...",TRUE,''); ?>
<?php endwhile; ?>
</div>
<?php
global $wp_query;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'prev_text' => __('« Previous'),
'next_text' => __('Next »'),
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages
) );
?>
I want first page to display 10 unique posts (5 in first loop and 5 in the second), second page the next 10 unique posts ( same as before) and so on.
Thank you.
UPDATED : Added pagination.