Hi Guys, I've recently ran into a page navi problem and was wondering if anybody could shed some light on this?
<?php get_header(); ?>
<div id="area_page_top">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="page_title"><?php single_cat_title(); ?></h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class="page_title">Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="page_title">Archive for <?php the_time('F jS, Y'); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="page_title">Archive for <?php the_time('F, Y'); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="page_title">Archive for <?php the_time('Y'); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="page_title">Author Archive</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="page_title">Blog Archives</h2>
<?php } ?>
</div>
<div id="container_box">
<div id="container">
<div id="page_left_zone">
<div class="clear-break"></div>
<div class="page_main_zone">
<?php query_posts('cat=4,7,6,16,27,30,55,21,35,91,90,17,81,3,67,9,20,78,34,11,28,39,25,29,23,36,10,24,12,66,83,32,22,53,18,1,62,68,82,64,42,19,5,79,26&posts_per_page=10'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="current_tournament" id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>"><div class="date-detail"><?php the_time('F jS, Y') ?></div>
<?php the_title(); ?></a>
</div>
<?php endwhile; ?>
<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php endif; ?>
</div>
</div>
<?php include(TEMPLATEPATH . '/CTA/large_single.php'); ?>
<div id="sidebarmain_notnews">
<?php include('includes/sidebar_pages2.php'); ?>
</div>
</div>
</div>
<?php get_footer(); ?>
That is currently the 'all news' category template I have set up for the page to display all the news submitted across the site. The first page seems to work fine and pulls in posts from various categories without any glitches, however when I click to go to page 2 I'm greeted with a "not found" error. So 'http://www.mysite.com/news/all-news/' seems to work fine, but 'http://www.mysite.com/news/all-news/page/2/' comes up with the not found error... I'm currently using the WP Page Navi plugin.
Thanks in advance.