How do I set WordPress Posts to be sub-posts of another Post?

I have X posts about various people. I want to have each person post have a subset of associated posts. Is there any way to do this?

I understand people could be categories, but then I run into a problem of not being able to allow for textual data associated with the people (categories don’t have a post-page equivalent).

Read More

Thanks in advance 🙂

Related posts

Leave a Reply

2 comments

  1. This can’t be done with WordPress posts because their post_parent field cannot be set using the WordPress admin interface as it can for pages.

    However, given that both content types use the same database table and share many fields, it should be possible to write a plugin to allow the post_parent field to be set for posts, you could then retrieve a post’s child posts using the get_children function.

    You’d need to add a metabox to the post edit page to provide a form for selecting the post parent, and then hook into the save_post action to save the chosen post to the post_parent field. See this example of how to add a metabox and hook into the save_post action: http://codex.wordpress.org/Function_Reference/add_meta_box#Example

  2. Creating these relationships and displaying them on any desired page with a widget or shortcode can be easily done with a plugin called Sub Posts. It’s not a free plugin, but it will do exactly what you’re asking. You can find more information at http://www.subposts.com