• Given this custom post type: band is it possible to automatically generate sub pages for each instance / term that belongs to the band taxonomy?

    Say an instance of the band custom post type is created: Queen. How could I automatically generate an about page, a albums page, etc. (subpages that belong to that custom post type)? Ideally anybody could create a new instance of the post type and the pages would be generated upon creation of this new post. Let’s say hundreds of bands could be instantiated, and therefore creating all those pages manually is less than ideal. And ideally the url structures would look like this:

    • /band/queen/about
    • /band/queen/albums
    • <!– and so on… –>

    How could I implement this?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Have you figured this out? I am looking for similar solution.

    I just came across this article, see if it helps and please post your thoughts

    http://www.placementedge.com/blog/create-post-sub-pages/

    Thanks

    Thread Starter DesignCDdev

    (@designcddev)

    @thescube I’ll check out the article, looks like it might be a solution to this issue. I personally don’t know much about the rewrite api, so for the time being I try to avoid using it until I learn more about how it actually works.

    The solution I used was to install a plugin named Timber and I used the routing capabilities that come along with it. You can read about it here. Basically, how routing works is you assign templates to url patterns.

    For all I know, that might be what the article is describing.

    Thread Starter DesignCDdev

    (@designcddev)

    Really the main problem here is that WordPress is not designed to support the kind of object oriented approach to building a site/application that has a number of different data models that have parent-child relationships. But if someone has a good solution that doesn’t require a plugin or creating “fake pages”, I’d love to hear it. End rant.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Create Sub Pages for Custom Post Type Instance’ is closed to new replies.