Removing the limit of posts per page

Removing the WordPress post per page limit: By default, WordPress posts are limited based on the posts_per_page setting. Making many of your older posts incredibly hard to find for both search engines and readers. Like many readers, I hate (pagination) having to read through pages of posts in a category one page at a time. So I decided to find a way to make every post within any given category show up on a single category page eliminating the need to flip through pages. In the following tutorial, I'll explain how this is accomplished.

How to remove the WordPress post per page limit:

  1. Login to your WordPress administration panel
  2. Navigate to Design -> Theme Editor and select either category.php or archive.php from the list. If neither exist, use an ftp program and copy your index.php file to category.php
  3. Find the following line:

    <?php get_header(); ?>

  4. And change it to look like this:

    <?php get_header(); query_posts( 'posts_per_page=-1&amp;cat=' . $cat ) ?>

  5. Click update file and go view your site