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

Alex Andrews awgandrews at gmail.com
Tue Mar 15 14:45:04 UTC 2011


That sounds like a fair solution, but this would be roughly the same
as having one custom post type - ie artists - what i want is two -
artists and releases.

Thanks a lot

Alex

On 12 March 2011 18:38, Dougal Campbell <dougal at gunters.org> wrote:
> 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>
> http://dougal.gunters.org/
> http://twitter.com/dougal
> http://twitual.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list