WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. nadine00
    Member
    Posted 4 years ago #

    Hi,

    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?

    Thanks.

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 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(); ?>

    http://codex.wordpress.org/Template_Tags/query_posts

  3. nadine00
    Member
    Posted 4 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