• What’s going on with the “posts paged” option? I set my reading option to 10 posts paged … and it doesn’t seem to “page” anything. I’m using the default index.php.
    Then, I go on the IRC channel, and people tell me I have to add code to make it work? What’s going on?

Viewing 2 replies - 16 through 17 (of 17 total)
  • Hi again,
    Two quick changes to Jaykul’s code and it’s working for multiple categories and search terms.
    To get multiple categories working I had to allow / symbols in the category part of the URL in the .htaccess rewrites, so I changed the first RewriteRule to read:
    RewriteRule ^category/(.*)?page/?([0-9]{1,})?/? /index.php?category_name=$1&paged=$2 [QSA,L]
    which works (ie: anything after category and page at the end of the URL), and I don’t think causes damage elsewhere.
    I also had a problem with search terms having two ampersands in the next page URL, which meant that it failed to go to the correct page. To get it working, simply change one line in the get_pagenum_link function, shortly after the if stristr line to:
    $qstr .= $querystring_separator.$page_querystring.$querystring_equal.$pagenum;
    The $querystring_equal is declared global above this point but never used, so it’s just a small typo.
    HTH,

    ian.

    posts_nav_link() will be in the default template in 1.3 and will have permalink support for both rewrite rules and path info.

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Bug in index.php – doesn’t “posts paged”’ is closed to new replies.