ThemeRouter resolves one winning theme for each request. The default precedence is designed so the most specific saved assignment wins over broader rules.
Default precedence
- The globally active WordPress theme is the fallback.
- A matching post type or taxonomy assignment overrides the fallback.
- An individual post or page assignment overrides the broader assignment.
Example
If all posts use a new blog theme but one long-form guide has its own assigned theme, that individual guide uses its saved theme. Removing the individual assignment returns it to the blog post type rule, not necessarily the globally active theme.
URL collisions are separate
When the same request path can resolve to both a page and a custom post type single, ThemeRouter applies collision safeguards. Exact ambiguous conflicts can return a 404 by default. Developers can alter tie-break behavior with documented filters after reviewing the URL architecture.
Do not solve unclear routing by adding more assignments. Record the request URL, expected resource, active theme, configured rules, and debug result before changing precedence.
Diagnose an unexpected result
Use the routing debug tools to identify the winning rule.
