[wp-hackers] hierarchical custom taxonomies vs good & old cats.

Haluk Karamete halukkaramete at gmail.com
Sat Dec 18 03:54:26 UTC 2010


Otto,

Whenever we use a non-hierarchical custom taxonomy ( say fruits for
instance), the terms ( such as apple,grape,fruit) goes under the
context of that taxonomy.  I call this the clever way of tagging. Tags
within a custom taxonomy are clever because they know their context.
The "apple" for instance know exactly that is the fruit apple and not
the computer Apple. Therefore, clicking on the apple tag pulls only
the fruit apples.

But... if I were to set the "fruits taxonomy" as hierarchical, then
this concept goes out of the window.

Perhaps this is the reason why the core team decided to set the
default as hierarchical = false! Cause when they are set as FALSE, it
really does wonders as a CMS...  it in facts, blows the built-in tags
taxonomy out of water. But, when they are set as TRUE, it offer NO
ADVATAGE over the built-in category taxonomy.

Let's now assume that we turn the fruits to be hierarchical

First, I'm unable to add "apple, grape and berries" in one go. I have
to take them one at a time...

Let's work with an example, maybe silly, but maybe that will make my point...

OK. create a taxonomy called "numbers" and build this hierarchy on it

numbers
----odd numbers
--------1
--------3
--------5
----even numbers
--------2
--------4

The above currently available. May be not convenient, but it is available.

It is not convenient, because when I have a post that deals with say,
1, 3, 411, I have to add each of these one by one.
enter 1 set its parent,
enter 3 set its parent
enter 411 set its parent

wouldn't you wish that there was a way to add "1,3,441" in one go (
exactly like the post-tag taxonomy allows you ) and you are done!

If the UI allowed me to do the following, what I'm proposing could
have been done.

Again, I create my numbers taxonomy and I set it as "hierarchical" and
then I add my immediate cats under it.

numbers
----odd numbers
----even numbers

that's it.  I'm good to go for tagging when the time comes...

assume, I'm on a post and I want to add tags 1,3,411 to it. Obviously,
they all are "odd numbers". so what do I do?

I click on "odd numbers", a text box opens up right beneath it, I type
"1,3,441" on it. And I'm done. I just tagged the post hierarchically
under "odd numbers".

Since this kind of UI does not exist, I cannot do that.

now coming to your very valid questions... which are

how would this theoretical hierarchy that you can create on the fly be useful?
What value is there to having a hierarchy on tags?
For example.. What would you use it for?

By alllowing tags a hierarchy of their own, and a context of their
own, I achieve the best of both worlds.

Say, I'm on a post, then the post will have this;

Numbers: odd numbers, 1, 3

If the user clicks on "odd numbers", WP will pull all the posts
"effortlessly" that has 1 or 3 or 441 or whatever is out there?
how is that possible? well, because tags are hierarchial and the tag
"odd number" will be aware of its children...

And on the other hand, if the user clicks on 1, then WP will pull only
those that has been tagged as 1

Isn't that the best of both worlds?

of course clicking 1 will NOT bring those posts that has been tagged
as 1 outside of the "NUMBERS TAXONOMY".

....

Maybe, the "odd_numbers" and tagging posts as 1 3 and so on does not
PRACTICALLY make sense, but I wanted to give a quick example of how a
"TAG HIERARCHY" could simplify lifes and bring a value to using the
custom taxonomies in "hierarchial=true" mode

The bottom line is...

I see no advantage gain by setting a custom taxonomy hierarchical. I
already got that with good old cats.





On Thu, Dec 16, 2010 at 8:59 PM, William Davis <will.davis at gmail.com> wrote:
> Haluk, I would recommend custom taxonomies
> (http://codex.wordpress.org/Custom_Taxonomies) Use a custom taxonomy fruit,
> a custom taxonomy devices, etc.
>
> On Dec 16, 2010, at 4:10 PM, Otto wrote:
>
>> On Thu, Dec 16, 2010 at 2:50 PM, Haluk Karamete <halukkaramete at gmail.com>
>> wrote:
>>>
>>> No Nacin, That wasn't what I was referring to. sorry it wasn't
>>> clear... here is the attemp2...
>>>
>>> Tags ( the built-in tag's I'm taking about ) is open ended. If I
>>> create a tag called say "apple", there is no context. Is it the
>>> computer apple? Is it the fruit apple? But If were to create
>>> taxonomies "fruits" and "computers",  I would have had the choice of
>>> inserting the word "apple" under the fruits taxonomy without mixing
>>> and matching, well, apples and oranges. ( what a confusing expression
>>> to refer to. )
>>>
>>> So, when I create a tag cloud for the fruits taxonomy, clicking on the
>>> word "apple" under the fruits cloud , that click woud never pull the
>>> Apple inc. stuff.  but, that's old business, the non-hier taxonomies
>>> already allow you to do this.
>>>
>>> So where is the problem?
>>>
>>> The problem is, that i lose all that power if I were choose to
>>> configure the fruits taxonomy to be as hierarchical.
>>>
>>> Because with a hierarchical taxonomy, I no longer add the word
>>> "apple", the same way I did with the non-hierarchical case. At this
>>> point, my two options are either to add the "apple" into the tags
>>> taxonomy as a good & old tag, or create an "apple" term and make its
>>> parent id Fruits. But then at this point, the system starts behaving
>>> exactly like the good & old cats.
>>>
>>>  if I were to create  2 groupings under the fruits taxonomy for
>>> example as "multi-color fruits", and I wanted to add the comma
>>> separated list "apple, grape, berry" under the "multi-color fruits" in
>>> one go. I cannot. That's the problem.
>>>
>>> In this example, the apple, grape stuff is screaming to be added as
>>> tag items. But, they end up getting into as children of "multi-color
>>> fruits", one at a time where at each time you need the point the
>>> parent ID, exactly like the way cats work, not the way tags work.
>>>
>>> sorry for the long expression but there yo have it.
>>> I don't know if I was able to make the point clearer now?
>>>
>>> The ideal ( and the most natural ) solution would be one that gives me
>>> the power to do this;
>>>
>>> step 1
>>> create fruits taxonomy, make it hierarchical.
>>>
>>> step 2
>>> create a term called "multi-color fruits" under the fruits taxonomy.
>>>
>>> step 3
>>> when you are adding a post and you want to tag it as apple, and also
>>> as berry ( just because the post is talking about a recipe which only
>>> uses apple and berries), you put a checkbox on the "multi-color
>>> fruits" and then add the apple and berry in a comma separated way in
>>> one go as apple,berry into another text box in the WP UI ( which is
>>> currently not available).
>>>
>>> the benefits of having something like this is this; it only extends
>>> the power of custom taxonomies by giving them the tag grouping power
>>> to its any level groupings.
>>>
>>> so that when my visitors are on that recipe page,
>>>
>>> they would be seeing something like this
>>>
>>> Fruits:     multi-color fruits, apple, grape
>>>
>>> where clicking on "multi-color fruits" will bring the posts that has
>>> been assigned to "multi-color fruits" which may bring posts that's
>>> been tagged not only by apple and grape but also berries.
>>>
>>> and where clicking on "apple" will bring only those posts that has
>>> been tagged with apple, while excluding the Apple Inc. related posts
>>> that have also been tagged as "apple".
>>
>> I didn't really understand that, but now I'm hungry for some reason. ;)
>>
>>
>> So your basic issue here is that you want hierarchical like
>> categories, but the ability to insert terms at-will like tags?
>>
>> That doesn't make a whole lot of sense, really, because if you can
>> insert them at-will, then there's no hierarchy inherent to them. Even
>> if you assume that you can check a box to define a parent for your
>> at-will terms, that's more limiting than categories because I can
>> assign categories from different parents to the same post.
>>
>> In other words, this sounds like either a misapplied design problem or
>> a user-interface issue.
>>
>> More to the point, how would this theoretical hierarchy that you can
>> create on the fly be useful? What value is there to having a hierarchy
>> on tags, for example? What would you use it for?
>>
>> -Otto
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> 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