This code enables you to set a different amount of posts per archive page, otherwise use the default WordPress Reading settings.
The example snippet in this tutorial sets a specific amount of posts per page for any number of categories, otherwise it uses the posts per page limit set in your WordPress Reading settings.
On top of this, it also includes a specific limit for search results pages and the home page.
To use this code, simply swap out the conditional tags for any type of archive and use your own I.D’s for each archive type.
Note for Genesis users: To set the posts per page for any pages using the Blog Page template, use the Genesis > Theme Settings > Blog Page Template settings as seen in the following image:
Here’s the code for logged in members, you can simply paste in your functions file. Works in any theme.