views:

153

answers:

1

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).

Thanks in advance :)

+1  A: 

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 (I can't find any existing plugins that do this), 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

Richard M