How to have a hierarchy of custom post types and use two of them in the permalink?


General Setup

I’m working on a setup to create a documentary / wiki site for a company. The site should have three different levels of hierarchy and one type of content at the lower end:

  • level 1: ‘area’ (high level structure, e.g. ‘internal stuff’ or ‘external projects’)
  • level 2: ‘topic’ (main structure, e.g. ‘controlling’ or ‘project xyz’)
  • level 3: ‘section’ (groups the content, for a project this could be ‘project management’)
  • level 4: ‘content’ (custom post type that holds the content, basically like

Issue 1

ideally I have a custom post type for all four level. but is this even possible? can I have a custom post type under another custom post type? I didn’t find anything about this…


so the permalinks should be like this:

simply lists all topics in this area, so area is kind of a category for topic

lists all the sections and the content entries

link to section is not needed

the link to content is tricky and the point where I need help:

Issue 2

so, the permalinks for the content should include the topic and the content. is this even possible if the section (the hierarchy between them) is not in the permalink?

Stephan 3 months 2023-09-10T17:02:41-05:00 0 Answers 0 views 0

Leave an answer