Pagination issues on Custom Post Types – 404 pages
-
Hi,
So I can’t seem to get pagination to work on my templates and its making me batty. I have a piece of code I’ve used for ages with no issues except for now, it seems to not work with post-types. I get a 404 error when i try to go to page two.
Any suggestions?
<?php // pagination $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; // query $listings = array( 'post_type' => 'event_listing', 'meta_key' => 'tf_events_startdate', 'orderby' => 'meta_value', 'order' => 'DESC', 'posts_per_page' => 2, 'paged' =>$paged ); ?> <?php query_posts($listings); ?> <?php if (have_posts()) : while (have_posts()) : the_post();?> <?php the_title();?> <?php endwhile; else: ?> <p><strong><?php include('inc/nope.php');?></strong></p> <?php endif; ?> <div class="postNavigation clearfix"> <p class="postNavL"><?php next_posts_link('« Older Entries') ?></p><p class="postNavR"><?php previous_posts_link('Newer Entries »') ?></p> </div> <!-- end .postnavigation --> <?php wp_reset_query(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Pagination issues on Custom Post Types – 404 pages’ is closed to new replies.