richarduk
Member
Posted 2 years ago #
I hesitate to say that this IS a bug ...
Using posts_nav_link in WP 2.1.1 (for paged posts) on my index page works fine with default permalinks, but with a custom permalink doesnt.
With the custom permalink /index.php/%post_id% I start off from
http://localhost/projects/Wordpress-test1/
and using Next Page go to (error page) http://localhost/projects/Wordpress-test1/index.php/page/2/
With default permalinks I go succesfully from
http://localhost/projects/Wordpress-test1/
to
http://localhost/projects/Wordpress-test1/index.php?paged=2
richarduk
Member
Posted 2 years ago #
Okay ...
I went over that page many times before I posted - which bit of that page should I be reading?
richarduk
Member
Posted 2 years ago #
Ok, resolved it.
I needed to put a query_string in the query_posts <?php query_posts($query_string . 'order=DESC&showposts=2') ?> which was in front of The Loop. For anyone reading, it's on this page and preserves information that would otherwise be lost:
http://codex.wordpress.org/Template_Tags/query_posts
polyfade
Member
Posted 2 years ago #
<?php query_posts($query_string . 'order=DESC&showposts=2') ?>
this doesn't always work.
for example, i have a total of 12 posts.
my admin number of posts to display is set for 3.
if i specify:
<?php query_posts($query_string . 'order=DESC&showposts=2') ?>
i'll get an error for /page/5
?query_string basically knows ahead of time how many pages it needs to produce based on your admin default. if it goes beyond that amount, you'll receive an error.