[wp-hackers] Adding taxonomies (and other custom fields) to taxonomies
The WordPress Web Warlock
wordpress at web-warlocks.net
Tue Aug 24 11:02:53 UTC 2010
En/na Andrés Sanhueza ha escrit:
> (...) My initial goal was to be able to assign
> more than a single parent to a taxonomy term (like Drupal does), but
> due to the way the tables are written it seems like a
> counter-productive job, so the most logical option should be to assign
> a non-hierarchical taxonomy to another taxonomy, much like these can
> be added to custom post types.
Why do you say that? I've been working with multiple parentage for terms
& other termmeta for a while now, and if anything, it looks to me that
using multiple taxonomies is counter-productive (you're complicating
things exponentially, for the one, and they're mutually exclusive).
Adding a taxonomy to another, non-core, taxonomy to have multiple
parents for a term would be adding a trouble layer to an unneeded layer.
Use just categories, add a termmeta table based on term id; if you need
it, add another termmeta for management of groups of terms that are
hierarchical among them (a group can be children/parent of any number of
other groups).
Cache all that, and manage the possibility of infinite recursion
somehow; you'll only need to use the category__in parameter of WP_Query
to list all the related posts.
I've got under development a plugin that does all that and more (and has
a theme, too, for the needs-theme-support features). I suppose the RC
will be finished by mid-end September, but if you're a brave man you
could deal with the beta. Check my site to see it working, and
specifically
http://www.web-warlocks.net/wordpress/plugins/zyx-term-meta/features/multiple-term-parentage
, for some (incomplete) docs.
BTW, my native languages are Catalan and Spanish (from Spain). Given
your name and the fact that you're stressing the e in Andrés, I suppose
this could be of some help, if you needed off-list support :)
More information about the wp-hackers
mailing list