• Resolved punkyb9

    (@punkyb9)


    I have a very simple loop on my single.php page that includes the previous/next post links. For some reason, both links appear on the first and last entries, even though it should only show one or the other. Any idea why this functionality might be broken? It happens in the default theme and doesn’t seem to be an issue with a plugin.

    <?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( 'content', 'single' ); ?>
    <?php previous_post_link(); ?>
    <?php next_post_link(); ?>
    <?php endwhile; // end of the loop. ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘previous_post_link and next_post_link show on first and last entries’ is closed to new replies.