how to add previous and next posts page
-
Hi,
I have multiple posts on one page (not the home page nor archive) and I want to add at the bottom of this page, links to recent posts-show current page number-older posts, all to be displayed on the same page. I’ve set it to have 5 posts per page and it works, but I can’t go to the next page of the following 5 older posts since no links shows up.
What I’m looking for should look more or less like this:
<< Prev 1 | 2 | 3 | 4 | Next >>
I’m using this, which is outside the loop:
<code><?php wp_link_pages(array('before' => 'Pages: ', 'next_or_number' => 'number')); ?></code>
but doesn’t do anything to the page.
and tried this:
<div class="navigation"> <div class="alignleft"><?php previous_posts_link('<< Previous') ?></div> <div class="alignright"><?php next_posts_link('Next >>') ?></div> </div>
and still nothing.
I’m looking to do this without a plugin.
Please, any help would be greatly appreciated.
Claudia
[Please post code or markup snippets between backticks or use the code button.]
- The topic ‘how to add previous and next posts page’ is closed to new replies.