WordPress: Older posts, newer posts
| geek, wordpressI always get confused by “Previous page” and “Next page” on WordPress blogs. After only a little struggling, I finally got my navigation sorted out so that you can page through it using “Older posts” and “Newer posts”.
I added the following to my style.css:
.navigation { font-weight: bold; font-size: larger }
.navigation .right { float: right }
.navigation .left { float: left }
Then I added this to my theme’s index.php:
<div class="navigation">
<div class="left">
<?php next_posts_link('« Older posts'); ?>
</div><div class="right">
<?php previous_posts_link('Newer posts »'); ?>
</div>
</div>
Result: yay!
1 comment
David Ing
2009-11-26T08:05:17ZThanks for the usability tip. I happened to be hacking my theme -- I actually decided not to change it, using plugins instead -- but since I already had the directory open, and the Filezilla fired up, I made the changes: "older" and "newer".