Support multiple post types in same tree -- CMS-like behavior

  1. stonor

    Today, it can be tricky to build a classic hierarchical site with multiple custom post types within the same tree structure, e.g.

    - Leaf 1
    - News item 1 (News post type)
    - Product A (Product post type)

    - Leaf 2
    - News item 2 (News post type)
    - Product B (Product post type)

    WordPress tends to treat each post type as an island, both when it comes to hierarchical structuring and URLs:

    - News item 1
    - News item 2

    - Product A
    - Product B

    The reason is that by default custom post types can only select a hierarchical parent of the same post type.

    Another issue is that WordPress encourages a kind of URL namespace for each post type, e.g.


    Instead of what I want:


    I would really love that option -- to work with a unified tree instead of separate islands of content.
    The easiest way would probably be to allow the selection of parents across hierarchical post types. And of cause the permastruct and permalink logic would have to be adapted as well.

    I know you could use taxonomies or the menu system (we do that today) as workarounds, but neither works really well.

    WordPress comes with a lot of blog legacy. I think this could be one of the steps towards a "normal CMS".

    Posted: 3 years ago #
  2. Ipstenu (Mika Epstein)

    That would not be what CPTs are meant for. If you want them all in the same hierarchy, you need a custom taxonomy. Tags and categories, for example.

    Posted: 3 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    3 Votes
  • Status

    This idea is under consideration