I faced the same problem sometime before. Havent really found a solution to that.
any one out there to help ?
I could easily hack wordpress to do it, but I was looking for an officially blessed method, so that I wouldn’t have to patch my installation every time I upgrade.
This has to be a pretty common request as it is a “feature” that is readily available in nearly all of the other blog software, particularly MovableType, the most logical direct competitor to WordPress.
I found what appears to be a solution, at least for me.
I’m using mod_rewrite rules generated by WordPress to enable clean URLs. So, what I did, was for the pages that I didn’t want paging, I just modified the rules to include a ‘nopaging’ query parameter. For example:
If second part of the rewrite rule looked like this (this is a monthly archive):
/index.php?&year=$1&monthnum=$2
I fixed it to look like this:
/index.php?nopaging=1&year=$1&monthnum=$2
I added “nopaging=1&” to the beginning of the query string.
There are a couple of downsides to this approach. The main one is that if you change your permalink paths, and your .htaccess file is writable, WordPress will likely clobber your changes so make sure to ‘chmod og-w’ your .htaccess file.
I don’t how to do this from inside a template. Maybe I’ll work on that next.
Ok,
I don’t know if this is the “officially blessed” approach, but it seems to work.
NOTE: I did this using WordPress 1.5 beta1 (05-Jan-26 nightly build). I have NO idea what this code will do to a 1.2 installation and I have no idea how to solve this problem in a 1.2 installation.
Immediately below the
<?php get_header(); ?>
call, add the following code:
<?php $posts = query_posts($query_string . '&nopaging=1'); ?>
That did it for me. And it SHOULD work for any page where you want to turn off paging, but I can’t guarantee that. If someone more knowledgeable would like to speak up, then please do so.
you can add this line inside date.php in WordPress theme folder.
<?php if (is_month()) { $posts = query_posts($query_string . ‘&nopaging=1’); } ?> just before ‘the loop’
This will make sure it happens only for the monthly archive…and not for the yearly archive.
I also had to enable paging, if the user is browsing the yearly archive..
I did add this, just before the end of ‘the loop’
<?php if (is_month()) {} else { ?><p align="center"><?php posts_nav_link() ?> <?php }; ?>