Tuts+ Tutorial: How to Let Users Dynamically Change the Number of Posts per Page in WordPress

Instructor: George Martsoukos

Consider the following scenario: you have a WordPress blog with hundreds of posts. On your blog list page, six posts appear at a time. Of course, there's pagination for moving between older and newer posts. But, what if you want to give users the option to choose the number of posts they want to display per page?

In this new tutorial, we'll learn how to achieve this functionality. For this demonstration, I'll work with a child theme of Twenty Twenty-One (v1.6 at the time of this writing). However, you can easily incorporate the code that I'll provide here into your custom themes.

Available on Tuts+ June 2022