[wp-hackers] to use or not to use a custom taxonomy
Haluk Karamete
halukkaramete at gmail.com
Sun Oct 30 16:58:33 UTC 2011
please compare the two in terms of pluses and minues.
say Joe is in need of creating 10 top level categories plus 1
hierarchial custom taxonomy to have 5 sub-categories under it.
just when he is about to do so, George comes along and say, why not do
the following instead?
create that 10 top level as you intended to.
and instead of creating that extra custom taxonomy, just create
another top level category ( the 11th one ) and classify the posts
under that accordingly. Do your sub 5 cats under that 11th. And when
it comes to display or work with your categories , just treat that
category 11 different. display it when it is needed, and don't display
it when you don't. This approach would be better when querying...
because you would end up needing to tap into only one taxonomy system
( that is "category") instead of two ( that is "category" plus "that
extra custom taxonomy".
http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/
says the following;
Speed Concerns
Advanced taxonomy queries are cool, but be aware that complex queries
are going to be slower. Not much slower, since the code does attempt
to do things smartly, but each taxonomy you add is the equivalent of
adding a JOIN. While the relevant tables are indexed, joins are still
slower than non-joins. So it won’t always be a good idea to build out
highly complex queries.
Is joe or george right?
If george is right, shall we just say, why mess with hierarchial
custom taxonomies at all. just use them as tags to bring a law and
order to the tag soup as the M. Fields nicely puts it here
http://wordpress.mfields.org/taxonomy/
More information about the wp-hackers
mailing list