Support » Plugins and Hacks » 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="http://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'] ==
    ''))) {
    ?>
    &nbsp; ">Latest Entry &nbsp;
    <?php
    next_post('%','Next Entry<img
    src="http://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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • where do i put this? i really need your help thanks

    i am getting this error: Parse error: parse error, unexpected ‘(‘ in /home/soinlov/public_html/roxanneguinoo2/WP/test.php on line 99

    tip: you can use $pagenow inside of basename (__FILE__)

    You mean it doesn’t work in 1.3? Bummer. I’m using 1.2 . Hopefully, someone that is using 1.3 can solve this issue before I upgrade.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.