On my single.php
I would like to show the single post then list all the posts with a pagination.
I use the following code:
<?php while ( have_posts() ) : the_post(); ?>
<!-- Show single post -->
<?php endwhile; ?>
<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
$all_posts_query = new WP_Query( array('posts_per_page' => 12, 'paged' => $page));
while($all_posts_query->have_posts()) : $all_posts_query->the_post(); ?>
<!-- Show all the posts -->
<?php endwhile; wp_reset_postdata(); ?>
<?php next_posts_link('older', '', 'yes'); ?>
As result I can see the single post then the first 12 posts and that all, no pager...
Thanks a lot for your time.