adding next, previous to pages with posts
-
I’m using archives.php to list posts by month and also by category. In both cases, I have WP set up to display one post per page, and I can’t seem to get the previous/next buttons at the bottom of the entries.
I searched the forums and found the following code to be placed after endwhile… I tried it on both page.php and single.php:
<div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div>
And in the same post the following code to by in the stylesheet:
.navigation { display:block; width:100%; } .alignleft { float:left } .alignright { float:right; }
Yet, placing these two snippets doesn’t add previous/next links to the pages with posts on them…
So I’m wondering if I have the first snippet in the wrong template file or if I’ve got the style code in the wrong place in that template… Or if I’ve missed something completely and have the wrong snippets entirely.
Any help is greatly appreciated.
- The topic ‘adding next, previous to pages with posts’ is closed to new replies.