I'd like the php next_post/php previous_post tags on the main page to show the name of the previous post title, not just a rather less-than-descriptive "previous" or "next". Is this at all possible? I don't know PHP, but I'm assuming that if it can be done on single.php pages, then it can be done on the main index.php page, too.
David Yeiser
Member
Posted 4 years ago #
Do you have an example site to link? Have you looked at next_post_link() and previous_post_link()?
daniiswara
Member
Posted 4 years ago #
how do I put title="..." on next_posts_link?
hmo00odi007
Member
Posted 4 years ago #
<div class="navigation">
<div class="alignleft"><?php previous_post_link('« %link') ?></div><br />
<div class="alignright"><?php next_post_link('%link »') ?></div>
</div>
This is what I use in my single.php, but I don't know if it also works if the next page has more than one post.