next_posts_link not showing up on page
-
I am having trouble with adding a next_posts_link. It isn’t appear on my page. Below is some code that I have at the bottom of my homepage, which shows a listing of my most recent posts. The posts are showing up fine … but I need a way to show a link to “older posts” …
Can someone tell me what I am doing wrong, or how I can do this?
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $numposts = 5; $postsarg = array ( 'cat' => '-2222,-2223,-2224,-299,-2231', 'posts_per_page' => $numposts, //for testing purposes 'paged' => $paged ); $the_query = new WP_Query( $postsarg ); while ($the_query -> have_posts()) : $the_query -> the_post(); get_template_part( 'excerpts' ); endwhile; ?> <!-- End BLOG ROLL --> <?php next_posts_link('Older Posts'); ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘next_posts_link not showing up on page’ is closed to new replies.