• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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++

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags