Skip to main content
6 events
when toggle format what by license comment
Sep 9, 2022 at 18:36 comment added superfive33 Ok... the /project_category/category1/page/2 URL is returning a 404 because there are no projects to display on page 2.... I just have 2 projects for this term in DB and I display 10 posts per page... 🤦‍
Sep 9, 2022 at 18:02 comment added superfive33 You're right @TomJNowell, I'm using a page template and tax template. I've edited my question.
Sep 9, 2022 at 18:02 history edited superfive33 CC BY-SA 4.0
added 173 characters in body
Sep 9, 2022 at 17:17 comment added Tom J Nowell Note I am assuming that /projects uses a page template, and /project_category uses taxonomy-project_category.php or equivalent theme template. If this is not the case please edit this info into your question so that it's clearer
Sep 9, 2022 at 17:15 comment added Tom J Nowell it's probably because although your custom WP_Query has a second page, the main query that loaded the template that lives at that URL does not. Creating a custom query with WP_Query is not how you change the results, it's a second new additional set of queries. If you want to change which posts the main query displays or change parameters then you should change it using the pre_get_posts filter, and then all of this pagination workaround code and the bugs dissappear.
Sep 9, 2022 at 16:41 history asked superfive33 CC BY-SA 4.0