<div id="pagination">
<div class="prev"><?php next_posts_link('←') ?></div>
<div class="pages">
<?php
global $wp_query;
$big = 9999;
echo paginate_links(array(
'base' => str_replace($big, '%#%', get_pagenum_link($big)),
'format' => '?paged=%#%',
'total' => $wp_query->max_num_pages,
'current' => max(1, get_query_var('paged')),
'show_all' => false,
'end_size' => 1,
'mid_size' => 5,
'prev_next' => false,
'prev_text' => 'Prev',
'next_text' => 'Next',
'type' => 'list'
));
?>
</div>
<div class="next"><?php previous_posts_link('→') ?></div>
</div>
Hi, I have a pagination loop setup and am choosing to display both the numbers and the prev / next links. However, I'm trying to figure out how I can end the #'s at the most recent 5 articles [1,2,3,4,5] instead of it carrying over to [1,2,3,4,5,6,7]. How would I go about ending it at the most recent 5 articles published on my blog?
"I'm just wanting to edit the div-class pages part so it just ends at 5." - If that makes any sense.