Working on a custom post template, using next_post_link and previous_post_link.
And they do — EXCEPT on the most recent post: where next and previous both point to previous. Which is…confusing.
Not trying to keep it in the same category or anything, though, within the post type — which should be happening by default I think.
Anybody seen anything like this?
Full template file here:
<?php
/**
* Single Posts Template
*/
?>
<?php get_header() ?>
<div id="container">
<div id="portfolio-content">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php
$custom = get_post_custom($post->ID);
$display_slides = $custom["slides"][0];
?>
<article id="post-<?php the_ID() ?>" <?php post_class() ?> >
<div class="slider full">
<?php echo ( do_shortcode( get_post_meta( $post->ID , 'slides' , true ) ) ); ?>
</div>
<div class="entry-title">
<h1><?php the_title(); ?></h1>
</div><!-- .entry-title -->
<div class="entry-content">
<?php the_content(); ?>
</div><!-- .entry-content -->
<div class="client">
<?php the_terms( $post->ID, 'client', 'Client: ' ); ?>
</div>
</article>
<div id="post-navigation" class="full">
<div class="nav-previous"><?php next_post_link( '%link', 'Previous Project' ); ?></div>
<div class="nav-next"><?php previous_post_link( '%link', 'Next Project' ); ?></div>
</div><!-- #post-navigation -->
<?php endwhile; else: ?>
<?php endif; ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_footer() ?>