The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] How do you make an archive with no pagination? (3 posts)

  1. nadine00
    Posted 6 years ago #


    This is probably a simple question, but how do I use the default archive.php page to display all the posts in either a category or a tag?

    eg: I have wordpress set to display 10 posts before paginating. But, that also means my archive, if i click on a tag or a catgeory link in a post...only displays 10 posts before paginating.

    How do I over-ride that?


  2. Michael
    Forum Moderator
    Posted 6 years ago #

    you probably have the loop in the archive.php which would look similar to:
    <?php while (have_posts()) : the_post(); ?>

    before it add a query - so the code looks like this:

    <?php global $query_string;
    query_posts( $query_string . '&posts_per_page=-1');
    while (have_posts()) : the_post(); ?>


  3. nadine00
    Posted 6 years ago #

    Figured it out. Had to use an if /is particular category or is_tag statement.

Topic Closed

This topic has been closed to new replies.

About this Topic