Support » Themes and Templates » [Resolved] next / previous posts link in a single page
7 years, 8 months ago
I’ve read the other posts in the forum but i can’t solve the problem.
I’m trying to display a single posts in a single page with the navigation “next_post_link” and “previous_post_link()”. But it seems not to work properly.
This is the code i wrote
<?php if (is_single()) : ?>
<?php previous_post_link('%link', 'Previous post in category', TRUE, ''); ?> | <?php next_post_link('%link', 'Next post in category', TRUE, ''); ?></div>
<?php endif; ?>
It doesn’t display the previuos link and the next link stops the navigation at the 2nd post.
Can anybody help?
Are you using this code inside The Loop?
Uhmm No, should i use it inside?
I’ll try. thanks
Thats it. it worked! thanks thanks a lot 😉