Hi
I've got an ajax post navigation that's working well - except that it shows a previous link on the last page...which, when clicked, obviously leads to a 404 - is there any way to hide the previous link on the last page?
Here's my code:
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$whatever = new WP_Query;
$whatever->query('post_type=whatever&posts_per_page=10&paged='. $paged);
?>
and then the post navigation:
<div class="navigation">
<div class="prev"><?php next_posts_link('PREVIOUS', '1000' ); ?></div>
<div class="next"><?php previous_posts_link('NEWER', '1000' ); ?></div>
</div>
Thanks in advance