• Hi guys, I’m having this issue on my single.php file. The next_post_link does not display but the previous_post_link displays and works correctly.

    Can be seen here.

    <?php
    /*
    Template Name: Single post
    */
    ?>
    
    <?php get_header(); ?>
    
    <!-- Content section -->
    <div id="content" class="clearfix">
    
    	<?php the_post(); ?>
    
    	<?php get_template_part( 'content_header' ); ?>
    
    	<!-- Blog -->
    	<section class="clearfix">
    
    	  <article <?php post_class('full'); ?> id="post-<?php the_ID(); ?>">
    
          	<a href="<?php the_permalink(); ?>" class="thumb"><?php the_post_thumbnail( 'newsimg' ); ?></a>
    	    		<?php echo wpautop(do_shortcode(get_the_content())); ?>
    
    <div style="width: 100%; margin-left: auto; margin-right: auto; text-align: center">
    	<?php next_post_link('%link', '<< Next', TRUE); ?> ||
    	<?php previous_post_link('%link', 'Previous >>', TRUE); ?>
    </div>
    	  </article>
    
    	</section>
    
    	<hr>
    
        <?php comments_template(); ?>
    
    </div>
    
    <?php get_footer(); ?>
  • The topic ‘next_post_link not working BUT previous_post_link IS working…’ is closed to new replies.