[wp-hackers] Time for a wp_post_relationships table?
Lox
lox.dev at knc.nc
Tue Aug 3 19:38:09 UTC 2010
2010/8/4 Otto <otto at ottodestruct.com>:
> But what exactly are you mirroring? The title of the post? Some of the
> content? A custom field?
Eg: I have my movies and actors custom post_types. To make the
relation I _mirrors_ actors (title + short description) to a custom
taxonomy actors_tax and then apply the right tax term(s) to each
movie.
> Posts are not taxonomies, which is why this
> has to be left up to the specific implementation. How you define your
> terms based on your post content is really your choice, sort of thing.
>
> It's not really all that hard to do, you simply add the term to the
> post with wp_set_object_terms when the post is published, and perhaps
> modify it when the post is edited (delete will be handled
> automatically, as when a post goes away, so does it's relationship
> with its terms). You can probably use transistion_post_status to
> handle both of those.
It is not a hard but it is a tedious task. Well it is what it seemed
to me, a new WP developer.
Since WP 3.0 I had to use custom post_type and I needed relations
between them three times. Why? Because taxonomies are too basic: no
HTML description, no thumbnail, no ordering. How? Using post meta
because I didn't have the time to mess up writing a taxonomy mirroring
system.
I am totally sure that many developers will need such post2post
relations too. So I think adding a mirrored_tax_id to custom post
types and have WP handle the mirroring is a neat feature I'll use a
lot, and I am sure others will too.
Anyway you are pointing to some interesting feature/functions I wasn't
aware of. Let me ask you about them in a separate thread.
Regards
--
Lox
lox.dev at knc.nc
More information about the wp-hackers
mailing list