Custom post type category pages pagination returns 404

The issue I’m having is with the pagination on category pages, e.g. /release-notes/category/upgrades/, where pages 2 and beyond return a 404. That’s because your custom rewrite rule does not support paged requests, i.e. it’s missing the RegEx ( regular expression pattern ) and query for the paged parameter. So you can either add another rewrite … Read more

Pagination URL not good

It looks like you’ve attempted to replace the default WP_Query object for your search page by instantiating a new WP_Query object. This has two main effects: firstly you’re hitting the database twice completely unnecessarily, slowing down the page execution; and secondly default template functionality like pagination depends on the default query for the page rather … Read more

posts_results filter – additional sort, with a meta value, to move posts to the end of the results, with pagination working

Okay, so why doesn’t this work: The Filter you are using is the posts_results, which is a filter that is applied AFTER the Results are retrieved from the database. Which has the problem that you are describing: Ordering happens on a page-per-page basis. What you want to do is add an order TO the SQL-Query, … Read more