No Limit To Posts Per Page

This code enables you to display all posts on the one archive page rather then limit how many are displayed.

You can modify the conditional tag to control your home page, archive pages or custom post type archives.

You can use nopaging set to true:

$query->set( 'nopaging', 'true' );

Or posts per page set to -1.

$query->set( 'posts_per_page', '-1' );

Please copy ALL the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.