How can I add pages under the URL structure of a Custom Post Type?
For example…
If I had a Custom Post Type called “Knowledge Base” … Located at: domain.com/knowledge-base/
… and I wanted to add a page called “Archives” … Located at: domain.com/knowledge-base/archives/
… and I wanted to add sub pages to the archives like … daily, weekly, monthly, yearly, etc. … Located at: domain.com/knowledge-base/archives/daily/
(for example).
The only way I can think of doing it is I have to add a page with a slug of “knowledge-base”, then add respective sub pages under that.
However, when doing that… The rewrite rules for the page seem to overwrite my post type archive when viewing domain.com/knowledge-base/
.
OR
The rewrite rules for the custom post type overwrite the page rewrite rules.
Either way, I’m not able to have a fully functioning custom post type with sub pages appended to it’s structure.
How can you add “pages” to your custom post type?