Support » Themes and Templates » Pagination Override Question

  • I just tonight discovered the magic of an archive template with the name of category-7.php. I like that you can customize for specific categories.

    I did run into this though. For this one specific category, is it possible to override the number of posts displyed before pagination kicks in? It’s set to 10 on my site, which for everything else is fine, but not this category. I’d like to make it much larger. Or better yet, display everything on one page.

    How can this be done just for a specific category? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael


    Forum Moderator

    in categeory-7.php, add:

    <?php global $query_string;
    query_posts($query_string . "&posts_per_page=-1"); ?>

    ( -1 for all, or enter the number you want)
    before the loop.


    I did look in the docs (Since I believe in RTFM before asking), but must have missed that page. Thank you.

    I did that back when you suggested it a few days ago, and it worked (thanks for the code).

    However, my pagination at the bottom still is showing 19 pages from when it was at the default of 10 per page. There any way to tell the pagination “Hey, I don’t really have that many pages anymore”?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pagination Override Question’ is closed to new replies.