[Resolved] Pagination not showing in custom loop
First off, I have done extensive research on this issue and have followed everything that seems pertinent, but I still can’t get pagination to display on an index page when called inside a custom loop, so I’m turning to you for help!
Here’s my code (edited down so that it doesn’t include any non-essential bits):
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $blog = new WP_Query(); $args = array( 'post_type' => 'blog', 'posts_per_page' => 3, 'paged' => $paged ); $blog->query($args); if ( $blog->have_posts() ) : while($blog->have_posts()) : $blog->the_post(); // Content endwhile; posts_nav_link(); endif;
Please help, I’m losing what little hair I have left!
Thanks in advance.
- The topic ‘[Resolved] Pagination not showing in custom loop’ is closed to new replies.