Post-to-Post Navigation
-
I have to share the answer to a problem that I had for quite sometime and posted on more than a few times…
My weblog is set at 1 posts paged. I was looking for a global post-to-post navigation that is chronological. That would entail there only be a “previous” link on the index.php page. If you have been looking for this also, here is the solution:
<?php
previous_post('%','<img
src="https://www.bbiverson.com/images/buttons/previous.jpg" alt="Read Previous Entry" align="middle" /> Previous Entry', 'no', 'no', 1, '');
if (!((basename (__FILE__) == 'index.php') && ($_SERVER['QUERY_STRING'] ==
''))) {
?>
">Latest Entry
<?php
next_post('%','Next Entry<img
src="https://www.bbiverson.com/images/buttons/next.jpg" alt="Read Next Entry"
align="middle" />', 'no', 'no', 1, '');
}
?>
Remove the “amp;” syntax, as it was erroneously added by miniBB (or by my stupidity, because I don’t know how to format code in these forums to get it to show correctly).
Thank goodness for the experts that frequent these forums!
- The topic ‘Post-to-Post Navigation’ is closed to new replies.