3.1 RC2 Adding any query to CPT archive removes archive functionality
-
Here’s something I just noticed, not sure if it’s an intended behaviour/result of my lack of knowledge
I had 3 CPTs, changed over all my CPT page templates to be archive-CPT.php and removed the queries. Turned on has archive, and all was right with the world.
On one of my CPTs, I needed 30 posts per page, so I dropped a simple query into the archive template to display 30 posts. That had the unintended consequence of showing all posts.
Seems if any simple query is used, the archive becomes an archive for all posts, not just the CPT any longer.
Is there a different way to do it?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘3.1 RC2 Adding any query to CPT archive removes archive functionality’ is closed to new replies.