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

Alex Andrews awgandrews at gmail.com
Wed Mar 23 21:12:43 UTC 2011


How would I go about implementing this when I register the post type.

Thanks a lot.

Alex

On 16 March 2011 01:12, Dougal Campbell <dougal at gunters.org> wrote:
> I'm not sure I understand why you say that. I still figured you'd have the
> Artists and Releases as separate CPTs. There's nothing (technically)
> stopping a post of type A from being the parent for posts of type B.
>
>
> On Mar 15 2011 10:45 AM, Alex Andrews wrote:
>>
>> 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
>>>
>
>
> --
> Dougal Campbell <dougal.campbell at gmail.com>
> http://dougal.gunters.org/ http://www.linkedin.com/in/dougal
> http://twitter.com/dougal http://twitual.com/
>


More information about the wp-hackers mailing list