I am working with a blog page that uses the following query:
<?php
$paged = (get_query_var("paged")) ? get_query_var("paged") : 1;
query_posts("category_name=blog&posts_per_page=2&paged=".$paged);
?>
and my pagination looks like:
<?php
$next = get_next_posts_link("Next >>");
$prev = get_previous_posts_link("<< Prev");
if ($prev || $next) { ?>
<div id='pagi'>
<?php } ?>
<?php if ($next) { ?>
<div class="right button">
<?php echo $next; ?>
</div>
<?php } ?>
<?php if ($prev) { ?>
<div class="left button">
<?php echo $prev; ?>
</div>
<?php } ?>
<?php if ($prev || $next) { ?>
<div class="clear">
<!-- -->
</div>
<?php } ?>
<?php if ($prev || $next) { ?>
</div>
<?php }
?>
The pagination is working to a certain extent...I see the previous and next links and can click next until I get to page 3, instead of arriving at page 3 I get a 404, which is weird because I know there is more content WordPress just doesn't display it for some reason. Anyone know what could be causing this issue, the weird thing is I am using the exact code on another website without error :-( The permlinks are set to the default and I am not using a custom post type.
Thanks,
Josh