I've set up a WordPress navigation for my single.php template that gets the previous and next post's thumbnails like this:
<?php
// Newer posts
$nails_next_post = get_next_post('%link', '', FALSE, 3 ); // Get the previous post
$nails_next_post_thumbnail = get_the_post_thumbnail($nails_next_post->ID); // Get thumbnail
?>
<?php if ($nails_next_post != null) : ?>
<div class="post-nav-next">
<?php if ($nails_next_post_thumbnail != null): ?>
<?php echo $nails_next_post_thumbnail; ?>
<?php else : ?>
<img src="<?php bloginfo('template_directory'); ?>/images/default-90x90.gif" />
<?php endif; ?>
<?php next_post_link('%link', 'Forward' , TRUE, 3 ); ?>
</div>
<?php endif; ?>
<?php
// Older posts
$nails_prev_post = get_previous_post('%link', '', FALSE, 3 ); // Get the previous post
$nails_prev_post_thumbnail = get_the_post_thumbnail($nails_prev_post->ID); // Get thumbnail
?>
<?php if ($nails_prev_post != null) : ?>
<div class="post-nav-previous">
<?php if ($nails_prev_post_thumbnail != null): ?>
<?php echo $nails_prev_post_thumbnail; ?>
<?php else : ?>
<img src="<?php bloginfo('template_directory'); ?>/images/default-90x90.gif" />
<?php endif; ?>
<?php previous_post_link('%link', 'Back' , TRUE, 3 ); ?>
</div>
<?php endif; ?>
The problem I am having is that the links continue to point to the next or previous post in the current post's category, rather than just the next or previous post in the chronology (except posts in category 3 of course). I'm out of my deoth here. Does anyone have any thoughts? Thanks :-)