How to show link to next posts in single.php

I can’t get get_next_posts_link to work. shouldn’t his code work?

<?php echo  get_next_posts_link(); ?>

Well, I am trying to get next 5 posts, any idea how?

EDIT:
Accroding to:

<?php next_post_link('<strong>%link</strong>', '%title', TRUE); ?>

Should show me a link to next post in the same category, when I do this nothing is shown. And I do have posts in the category.

Thanks!

2 Answers
2

Use this for a link to previous posts with directional arrows:

<?php previous_post_link(); ?>

Or this for a link to previous posts that without “<<:

<?php previous_post_link('<strong>%link</strong>'); ?>

The code needs to be inside the loop.

Leave a Comment