I have the following setup:
- A custom post-type “intern_post” with
slug => 'intern/post' - A custom taxonomy “intern_category” with
slug => 'intern/category'which is linked to the CPT - The taxonomy registration runs before the custom post type registration
The error (404) occurs when I’m trying to access the custom taxonomy archive pages from 2 and on.
First I thought WordPress might get confused with the custom taxonomy and post-type. But the error still occurs even if I register the custom taxonomy with a simpler and unique slug…
The Query Monitor Plugin even indicates that WP recognizes the right rewrite rule(s):
intern/category/([^/]+)/page/?([0-9]{1,})/?$ => intern_category=$matches[1]
&paged=$matches[2]
I’ve seen some similar problems where they tried to solve the issue with tons of additional rewrite rules—which in my eyes seemed pretty dirty.
To me it seems like the rewrite rules themselves work, WP get’s all the necessary Query parameters set but still refuses to load the correct template file.
Does anyone have a clue what’s wrong here?