I'm trying to add links "Previous Post" and "Next Post" in my single.php file without success because previous_posts_link and next_posts_link dont return anything.
Honestly I do not know where in the loop put these buttons.
Thanks.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post-content">
<?php the_title(); the_content(); ?>
</div>
<?php endwhile; ?>
<ul class="nav-posts">
<li class="prev-link"><?php next_posts_link('« Previous Post') ?></li>
<li class="next-link"><?php previous_posts_link('Next Post»') ?></li>
</ul>
<?php endif; ?>