If you want your category pages to operate as a complete archive of all posts in that category (basically removing any type of pagination), you can make some simple changes to the basic Loop.
Open or create your theme's category.php
file. This template file is used to display your category archives. Create a basic Loop by following the directions from the recipe Creating a basic Loop.
Above your Loop, insert the following code:
global $wp_query; query_posts( array_merge( array('nopaging' => true), $wp_query->query ) );
In the above code snippet, the query_posts
function is used to modify the global query object. To ensure that all of the appropriate query parameters are preserved from the original query, the new parameters are merged with the old parameters. The old parameters are kept in the array $wp_query->query
.
The nopaging
parameter is set to true
to indicate that all posts should be returned...