WP_Query settings for pagination on fixed pages

When implementing pagination on a fixed page in WordPress, if you set 'no_found_rows' => true in the WP_Query parameter, the pagination may not display.

This is because when 'no_found_rows' => true is set, WP_Query does not query the database for the total number of posts, so it lacks the information to make pagination work properly.

Therefore, it is recommended that ‘no_found_rows '=> false or 'no_found_rows' not be set when implementing pagination on fixed pages.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top