wp 2.02, posts_nav_link, and 404 errors
-
I currently have WordPress 2.02 set up at Ubersoft.net to be the publishing platform for my webcomic. It’s been up for a little under a week, and all in all it is working very well. However, I have noticed a little problem when it comes to site navigation that I hope some of you folks can help me work around.
At the top and bottom of the main index page I use the following navigation code, which was taken with very little modification from the Kubrick theme:
<div class="navigation">
<div class="alignleft"><?php posts_nav_link('','','<img name="previous_day" alt="Previous Day" src="http://ubersoft.net/images/previous_day.png">') ?></div>
<div class="alignright"><?php posts_nav_link('','<img name="next_day" alt="Next Day" src="http://ubersoft.net/images/next_day.png">','') ?></div>
</div>
The biggest difference is the use of images, I guess. Anyway, the overall effect is that from the front page you can browse forward and back through the comics with a minimum of fuss…
… until you get to the very “earliest” index page — currently the page for March 13, also known as “ubersoft.net/page/11”. At that point, there is still a “previous” link, and if you click on it, it tries to load “ubersoft.net/page/12,” which doesn’t exist, so you get a 404 instead.
Is there any way to make the “previous day” posts_nav_link disappear when there are no more previous pages to read?
I have tried putting the posts_nav_linkl in the loop, but that doesn’t help.
The topic ‘wp 2.02, posts_nav_link, and 404 errors’ is closed to new replies.