Support » Themes and Templates » Change default number of posts for archive.php?

  • In the reading panel I’ve set the number of posts to 5, but in an archive.php view I’ve compressed the output — so I’d really like to see 30 posts retrieved.

    I’ve put the query_posts(showposts=30) before the loop, but it’s now ONLY showing the first 30 posts, even after I click the “previous” button to view more.

    How do I get the archive.php to ignore the default number of posts to show?


Viewing 1 replies (of 1 total)
  • I’ve done this before but I don’t have the code in front of me right now so this may contain errors. Try it and let me know.
    add the following above query_posts(showposts=30)
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    Then change your query_posts to

Viewing 1 replies (of 1 total)
  • The topic ‘Change default number of posts for archive.php?’ is closed to new replies.