[wp-hackers] WP Custom Post Type as 'Taxonomy' for Other Custom Post Type

Dougal Campbell dougal at gunters.org
Sat Mar 12 18:38:37 UTC 2011

On Mar 12 2011 10:56 AM, Alex Andrews wrote:
> Hi guys,
> Thanks very much for this, these look great. But I wasn't really
> looking for a plugin solution to the problem but roughly how one would
> go about coding these kind of relationships where one has post type B
> (releases) being organised under post type A (artists) within a single
> plugin (or even in a functions .php file). So how to make one post
> type owned by another simply - linking two together in a way that is
> equivalent to a "artists has_many releases" in SQLish psuedo-code.

Have you already considered just using the post_parent property in the 
child posts to point at the parent? You could just use get_children() to 
find the releases of an artist.

Dougal Campbell <dougal at gunters.org>

More information about the wp-hackers mailing list