Limit paginated result set to a maximum number of posts
Hope I understand this correctly. Below is an approach using few hooks to modify the query before fetching the data. Might need some adjustments and testing. Note that numberposts is just an alias for posts_per_page in get_posts() wrapper of WP_Query. We could try to use paged instead of offset, but it will not work if … Read more